Skip to content

Commit

Permalink
fixes to sw spi. adafruit 31855 now works with sw spi and autodetect …
Browse files Browse the repository at this point in the history
…of it. also fixed ziplogs to use cat.
  • Loading branch information
jbruce12000 committed Dec 1, 2023
1 parent bf6c72b commit 07ea69c
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 3 deletions.
2 changes: 1 addition & 1 deletion lib/oven.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
import os
import digitalio
import busio
import bitbangio
import adafruit_bitbangio as bitbangio
import statistics

log = logging.getLogger(__name__)
Expand Down
3 changes: 3 additions & 0 deletions requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,9 @@ requests
adafruit-circuitpython-max31855
adafruit-circuitpython-max31856

# for folks using sw spi (bit banging)
adafruit-circuitpython-bitbangio

# untested - for PT100 platinum thermocouples
#adafruit-circuitpython-max31865

Expand Down
3 changes: 2 additions & 1 deletion test-thermocouple.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
import time
import datetime
import busio
import adafruit_bitbangio as bitbangio

try:
import board
Expand Down Expand Up @@ -43,6 +44,7 @@
print("Software SPI selected for reading thermocouple")

cs = DigitalInOut(config.spi_cs)
cs.switch_to_output(value=True)
sensor = None

print("\nboard: %s" % (board.board_id))
Expand All @@ -62,7 +64,6 @@
print(" config.spi_cs = %s BCM pin\n" % (config.spi_cs))
print("Degrees displayed in %s\n" % (config.temp_scale))


while(True):
time.sleep(1)
temp = sensor.temperature
Expand Down
2 changes: 1 addition & 1 deletion ziplogs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
echo "----------------------------------------------"
echo "| Writing all kiln logs to ./kiln.logs.gz... |"
echo "----------------------------------------------"
zgrep --no-filename -E "(INFO|WARN|ERROR) (oven|kiln-controller|gevent)" /var/log/* 2>/dev/null|strings|sort|uniq|gzip > kiln.logs.gz
zcat -f /var/log/* 2>/dev/null|strings|grep -E "(INFO|WARN|ERROR) (oven|kiln-controller|gevent)"|sort|uniq|gzip > kiln.logs.gz

ls -la kiln.logs.gz

Expand Down

0 comments on commit 07ea69c

Please sign in to comment.