From 70d1e81a9bbfc55cf4acd21f807aa54814724381 Mon Sep 17 00:00:00 2001 From: jbruce Date: Thu, 3 Nov 2022 10:22:52 -0400 Subject: [PATCH] docs update --- README.md | 24 ++++++++++++++++++++++++ docs/troubleshooting.md | 4 ++-- 2 files changed, 26 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 11f4132..73c23dc 100644 --- a/README.md +++ b/README.md @@ -84,6 +84,12 @@ If you're done playing around with simulations and want to deploy the code on a $ export CFLAGS=-fcommon $ pip3 install -r requirements.txt +### Enable SPI + + $ sudo raspi-config + interfacing options -> SPI -> Select **Yes** to enable + select reboot + ## Configuration All parameters are defined in config.py, review/change to your mind's content. @@ -92,6 +98,24 @@ You should change, test, and verify PID parameters in config.py. Here is a [PID You may want to change the configuration parameter **sensor_time_wait**. It's the duty cycle for the entire system. It's set to two seconds by default which means that a decision is made every 2s about whether to turn on relay[s] and for how long. If you use mechanical relays, you may want to increase this. At 2s, my SSR switches 11,000 times in 13 hours. +## Testing + +After you've completed connecting all the hardware together, there are scripts to test the thermocouple and to test the output to the solid state relay. Read the scripts below and then start your testing. First, activate the virtual environment like so... + + $ source venv/bin/activate + +then test the thermocouple with: + + $ ./test-thermocouple.py + +then test the output with: + + $ ./test-output.py + +and you can use this script to examine each pin's state including input/output/voltage on your board: + + $ ./gpioreadall.py + ## Usage ### Server Startup diff --git a/docs/troubleshooting.md b/docs/troubleshooting.md index aa720ff..ce139e3 100644 --- a/docs/troubleshooting.md +++ b/docs/troubleshooting.md @@ -24,7 +24,7 @@ If you're using a breadboard with a labeled break-out board, verify: I thought at one point that I had fried my RPi. I needed to verify that it still worked as expected. Here's what I did to verify GPIO on my pi. -```gpio readall``` +```source venv/bin/activate; ./gpioreadall.py``` and you'll get output that looks something like this... @@ -76,7 +76,7 @@ This will show you the output of gpio readall every 2 seconds. This way you can moving a wire to each gpio pin and then look up to verify **V** has changed as you expect without having to type. -```watch gpio readall``` +```watch ./gpioreadall.py``` * connect a 3V3 pin in series to a 1k ohm resistor * connect the other end of the resistor to each gpio pin one at a time