-
Notifications
You must be signed in to change notification settings - Fork 133
Description
Apologies for the newbie question, but I having trouble with the follow bit of config.py .. as in its not clear to me how i switch from hardware to software, and how I assign the pins if software,..
#######################################
SPI pins if you choose Hardware SPI
#######################################
On the raspberry pi, you MUST use predefined
pins for HW SPI. In the case of the adafruit-31855, only 3 pins are used:
SPI0_SCLK = BCM pin 11 = CLK on the adafruit-31855
SPI0_MOSI = BCM pin 10 = not connected
SPI0_MISO = BCM pin 9 = D0 on the adafruit-31855
plus a GPIO output to connect to CS. You can use any GPIO pin you want.
I chose gpio pin 5:
GPIO5 = BCM pin 5 = CS on the adafruit-31855
Note that NO pins are configured in this file for hardware spi
#######################################
SPI pins if you choose software spi
#######################################
For software SPI, you can choose any GPIO pins you like.
You must connect clock, mosi, miso and cs each to a GPIO pin
and configure them below based on your connections.
#######################################
SPI is Autoconfigured !!!
#######################################
whether you choose HW or SW spi, it is autodetected. If you list the PINs
below, software spi is assumed.
Specifically, if I want to use software SPI how do I do it? I wired up my PIzero to MAX31855 in the following manner:
3Vo to Pin 1 (3.3v DC)
GND to Pin 9 (Ground)
DO to Pin 11 (GPIO 17)
CS to Pin 13 (GPIO 27)
CLK to Pin 15 (GPIO 22)
based on https://www.instructables.com/Build-a-Web-Enabled-High-Temperature-Kiln-Controll/
so what lines and where do I put in config.py to support this?
thanks