From 22b663f64800d6ff9ade1ddff36a746b5472ecc6 Mon Sep 17 00:00:00 2001 From: jbruce Date: Wed, 9 Nov 2022 13:09:01 -0500 Subject: [PATCH] make config work on linux --- config.py | 20 +++++++++----------- 1 file changed, 9 insertions(+), 11 deletions(-) diff --git a/config.py b/config.py index 3547512..84d7ebb 100644 --- a/config.py +++ b/config.py @@ -3,11 +3,6 @@ import os from digitalio import DigitalInOut import busio -try: - import board -except NotImplementedError: - print("not running on blinka recognized board, probably a simulation") - ######################################################################## # # General options @@ -52,12 +47,15 @@ currency_type = "$" # Currency Symbol to show when calculating cost to run j # To control the kiln, one gpio pin is used as an output. Pick any # you like. I chose gpio pin 23. This output is used to control a # zero-cross solid-state-relay. - -spi_sclk = board.D11 #spi clock -spi_mosi = board.D10 #spi Microcomputer Out Serial In (not connected) -spi_miso = board.D9 #spi Microcomputer In Serial Out -spi_cs = board.D5 #spi Chip Select -gpio_heat = board.D23 #output that controls relay +try: + import board + spi_sclk = board.D11 #spi clock + spi_mosi = board.D10 #spi Microcomputer Out Serial In (not connected) + spi_miso = board.D9 #spi Microcomputer In Serial Out + spi_cs = board.D5 #spi Chip Select + gpio_heat = board.D23 #output that controls relay +except NotImplementedError: + print("not running on blinka recognized board, probably a simulation") ### Thermocouple Adapter selection: # max31855 - bitbang SPI interface