fixes to sw spi. adafruit 31855 now works with sw spi and autodetect of it. also fixed ziplogs to use cat.
This commit is contained in:
parent
bf6c72bba4
commit
07ea69cdb2
@ -7,7 +7,7 @@ import config
|
||||
import os
|
||||
import digitalio
|
||||
import busio
|
||||
import bitbangio
|
||||
import adafruit_bitbangio as bitbangio
|
||||
import statistics
|
||||
|
||||
log = logging.getLogger(__name__)
|
||||
|
||||
@ -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
|
||||
|
||||
|
||||
@ -4,6 +4,7 @@ from digitalio import DigitalInOut
|
||||
import time
|
||||
import datetime
|
||||
import busio
|
||||
import adafruit_bitbangio as bitbangio
|
||||
|
||||
try:
|
||||
import board
|
||||
@ -43,6 +44,7 @@ if spi is None:
|
||||
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))
|
||||
@ -62,7 +64,6 @@ print(" config.spi_miso = %s BCM pin" % (config.spi_miso))
|
||||
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
|
||||
|
||||
2
ziplogs
2
ziplogs
@ -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
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user