Partial implementation of settings & sensors

This commit is contained in:
Krumel
2021-04-20 20:51:36 +02:00
parent fb3d7a73e2
commit b62201537a
4 changed files with 195 additions and 4 deletions

10
main.py
View File

@ -1,10 +1,12 @@
import machine
import time
if machine.reset_cause() != machine.DEEPSLEEP_RESET:
print("Reset detected, waiting 10 seconds to give you time to interrupt...")
time.sleep(10)
import urequests
adc = machine.ADC(machine.Pin(32))
adc.atten(machine.ADC.ATTN_11DB)
while (1):
n = int(adc.read()/64)
print("|" + "#"*n + " "*(64-n) + "|", end="\r")
time.sleep_ms(100)