Add new service and update set point

This commit is contained in:
William Moore 2022-04-04 14:37:06 -05:00
parent 0ba5eaffb6
commit 820435e654
2 changed files with 9 additions and 2 deletions

View File

@ -23,7 +23,7 @@ import time
import os
import json
set_point = 95.0
set_point = 82.22
sleep_timer = 15
spi = board.SPI()

View File

@ -17,8 +17,15 @@
import board
import digitalio
import adafruit_max31865
from flask import Flask
app = Flask(__name__)
spi = board.SPI()
cs = digitalio.DigitalInOut(board.D26)
sensor = adafruit_max31865.MAX31865(spi, cs, wires=3)
print(sensor.temperature)
@app.route('/')
def get_sensor():
return {'temperature': sensor.temperature}