esp32_lichtsensor/boot.py

17 lines
200 B
Python
Raw Permalink Normal View History

2018-04-21 00:02:26 +02:00
import machine
2018-04-21 01:51:01 +02:00
import time
import SI1145
2018-04-21 00:02:26 +02:00
i2c = machine.I2C(scl=machine.Pin(27), sda=machine.Pin(26))
2018-04-21 01:51:01 +02:00
s = SI1145.SI1145(i2c)
s.readIR()
s.readUV()
s.readVisible()
while True:
time.sleep(10)
2018-04-21 00:02:26 +02:00