File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -6,6 +6,7 @@ Introduction
66
77` pyduino-includes ` is a SNAPpy library that is designed to make development for the Synapse Pyduino board easier. It
88allows references to the nifty Pyduino IO names (like D3, AD0, or SCL) instead of the underlying SNAPpy GPIO numbers.
9+ It also provides a bit-banged SPI implementation that can be used for shields that utilize the SPI pins.
910
1011Installation
1112------------
@@ -42,3 +43,13 @@ Pins can be referenced as follows:
4243| Analog | A0 - A5 |
4344| i2c | SDA, SCL |
4445
46+ Setting up the SPI pins is very simple, too:
47+
48+ ``` python
49+ from PyduinoIncludes.SPI import *
50+
51+ def my_spi_function ():
52+ spi_init() # Sets up the bit-banged SPI
53+ spi_write(" \x12\x34\x56 " ) # Write data to the SPI bus
54+ spi_read(4 ) # Read four bytes from the SPI bus
55+ ```
You can’t perform that action at this time.
0 commit comments