add code blocks

pull/186/head
jbruce12000 2023-12-05 13:07:31 -05:00
rodzic 0b67e0c69e
commit 5559e48cd6
1 zmienionych plików z 8 dodań i 0 usunięć

Wyświetl plik

@ -21,33 +21,41 @@ The easiest way to convert from the old code to the new is to use software spi,
2. find these settings in config.py.bak and change them in config.py: 2. find these settings in config.py.bak and change them in config.py:
```
gpio_sensor_cs = 27 gpio_sensor_cs = 27
gpio_sensor_clock = 22 gpio_sensor_clock = 22
gpio_sensor_data = 17 gpio_sensor_data = 17
gpio_sensor_di = 10 gpio_sensor_di = 10
gpio_heat = 23 gpio_heat = 23
```
change them in config.py to look like so: change them in config.py to look like so:
```
spi_cs = board.D27 spi_cs = board.D27
spi_sclk = board.D22 spi_sclk = board.D22
spi_miso = board.D17 spi_miso = board.D17
spi_mosi = board.D10 #this one is not actually used, so set it or not spi_mosi = board.D10 #this one is not actually used, so set it or not
gpio_heat = board.D23 gpio_heat = board.D23
```
3. test the thermocouple board and thermocouple 3. test the thermocouple board and thermocouple
```
cd kiln-controller cd kiln-controller
source venv/bin/activate source venv/bin/activate
./test-thermocouple.py ./test-thermocouple.py
```
You should see that software spi is configured. You should see the pin configuration printed out. You should see the temperature reported every second. You should see that software spi is configured. You should see the pin configuration printed out. You should see the temperature reported every second.
4. test output 4. test output
```
cd kiln-controller cd kiln-controller
source venv/bin/activate source venv/bin/activate
./test-output.py ./test-output.py
```
Every 5 seconds, verify the output is flipped from on to off or vice versa. Every 5 seconds, verify the output is flipped from on to off or vice versa.