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 os
|
||||||
import digitalio
|
import digitalio
|
||||||
import busio
|
import busio
|
||||||
import bitbangio
|
import adafruit_bitbangio as bitbangio
|
||||||
import statistics
|
import statistics
|
||||||
|
|
||||||
log = logging.getLogger(__name__)
|
log = logging.getLogger(__name__)
|
||||||
|
|||||||
@ -10,6 +10,9 @@ requests
|
|||||||
adafruit-circuitpython-max31855
|
adafruit-circuitpython-max31855
|
||||||
adafruit-circuitpython-max31856
|
adafruit-circuitpython-max31856
|
||||||
|
|
||||||
|
# for folks using sw spi (bit banging)
|
||||||
|
adafruit-circuitpython-bitbangio
|
||||||
|
|
||||||
# untested - for PT100 platinum thermocouples
|
# untested - for PT100 platinum thermocouples
|
||||||
#adafruit-circuitpython-max31865
|
#adafruit-circuitpython-max31865
|
||||||
|
|
||||||
|
|||||||
@ -4,6 +4,7 @@ from digitalio import DigitalInOut
|
|||||||
import time
|
import time
|
||||||
import datetime
|
import datetime
|
||||||
import busio
|
import busio
|
||||||
|
import adafruit_bitbangio as bitbangio
|
||||||
|
|
||||||
try:
|
try:
|
||||||
import board
|
import board
|
||||||
@ -43,6 +44,7 @@ if spi is None:
|
|||||||
print("Software SPI selected for reading thermocouple")
|
print("Software SPI selected for reading thermocouple")
|
||||||
|
|
||||||
cs = DigitalInOut(config.spi_cs)
|
cs = DigitalInOut(config.spi_cs)
|
||||||
|
cs.switch_to_output(value=True)
|
||||||
sensor = None
|
sensor = None
|
||||||
|
|
||||||
print("\nboard: %s" % (board.board_id))
|
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(" config.spi_cs = %s BCM pin\n" % (config.spi_cs))
|
||||||
print("Degrees displayed in %s\n" % (config.temp_scale))
|
print("Degrees displayed in %s\n" % (config.temp_scale))
|
||||||
|
|
||||||
|
|
||||||
while(True):
|
while(True):
|
||||||
time.sleep(1)
|
time.sleep(1)
|
||||||
temp = sensor.temperature
|
temp = sensor.temperature
|
||||||
|
|||||||
2
ziplogs
2
ziplogs
@ -3,7 +3,7 @@
|
|||||||
echo "----------------------------------------------"
|
echo "----------------------------------------------"
|
||||||
echo "| Writing all kiln logs to ./kiln.logs.gz... |"
|
echo "| Writing all kiln logs to ./kiln.logs.gz... |"
|
||||||
echo "----------------------------------------------"
|
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
|
ls -la kiln.logs.gz
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user