Partial implementation of settings & sensors
This commit is contained in:
10
main.py
10
main.py
@ -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)
|
||||
Reference in New Issue
Block a user