Add new service and update set point
This commit is contained in:
parent
0ba5eaffb6
commit
820435e654
@ -23,7 +23,7 @@ import time
|
||||
import os
|
||||
import json
|
||||
|
||||
set_point = 95.0
|
||||
set_point = 82.22
|
||||
sleep_timer = 15
|
||||
|
||||
spi = board.SPI()
|
||||
|
@ -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}
|
||||
|
Loading…
Reference in New Issue
Block a user