add a note about GPIO collisions with system SPI

pull/1/head
Andrew Malota 2017-12-01 18:59:07 -06:00
rodzic 9874aeb1d8
commit de0d3baadb
2 zmienionych plików z 10 dodań i 1 usunięć

Wyświetl plik

@ -41,7 +41,7 @@ gpio_door = 18
# max6675 - bitbang SPI interface
max31855 = 1
max6675 = 0
max31855spi = 0
max31855spi = 0 # if you use this one, you MUST reassign the default GPIO pins
### Thermocouple Connection (using bitbang interfaces)
gpio_sensor_cs = 27

Wyświetl plik

@ -20,6 +20,15 @@ try:
import Adafruit_GPIO.SPI as SPI
from max31855spi import MAX31855SPI, MAX31855SPIError
log.info("import MAX31855SPI")
spi_reserved_gpio = [7, 8, 9, 10, 11]
if config.gpio_air in spi_reserved_gpio:
raise Exception("gpio_air pin %s collides with SPI pins %s" % (config.gpio_air, spi_reserved_gpio))
if config.gpio_cool in spi_reserved_gpio:
raise Exception("gpio_cool pin %s collides with SPI pins %s" % (config.gpio_cool, spi_reserved_gpio))
if config.gpio_door in spi_reserved_gpio:
raise Exception("gpio_door pin %s collides with SPI pins %s" % (config.gpio_door, spi_reserved_gpio))
if config.gpio_heat in spi_reserved_gpio:
raise Exception("gpio_heat pin %s collides with SPI pins %s" % (config.gpio_heat, spi_reserved_gpio))
if config.max6675:
from max6675 import MAX6675, MAX6675Error
log.info("import MAX6675")