from machine import Pin, PWM, ADC
from time import sleep
s1 = Pin(14, Pin.IN, Pin.PULL_UP)
s2 = Pin(27, Pin.IN, Pin.PULL_UP)
s3 = Pin(26, Pin.IN, Pin.PULL_UP)
s4 = Pin(25, Pin.IN, Pin.PULL_UP)
s5 = Pin(33, Pin.IN, Pin.PULL_UP)
msg = ADC(Pin(32), atten = ADC.ATTN_11DB)
led = Pin(15, Pin.OUT)
led1 = Pin(17, Pin.OUT)
led2 = Pin(21, Pin.OUT)
###################################################################################
while True:
if s1.value() == 1 and s2.value() == 1:
led.on()
elif s1.value() == 0 and s2.value() == 0:
led.off()
###################################################################################
elif s3.value() == 1 and s4.value() == 1 and s1.value() == 0:
print('volts', msg.read_uv()/1000000)
sleep(.1)
###################################################################################
if s1.value() == 1 and s2.value() == 1 and s3.value() == 1 and s4.value() == 1 and s5.value() == 1:
led.on()
led1.on()
led2.on()
sleep(.25)
if s1.value() == 1 and s2.value() == 1 and s3.value() == 1 and s4.value() == 1 and s5.value() == 1:
led.off()
led1.off()
led2.off()
sleep(.75)
esp:0
esp:2
esp:4
esp:5
esp:12
esp:13
esp:14
esp:15
esp:16
esp:17
esp:18
esp:19
esp:21
esp:22
esp:23
esp:25
esp:26
esp:27
esp:32
esp:33
esp:34
esp:35
esp:3V3
esp:EN
esp:VP
esp:VN
esp:GND.1
esp:D2
esp:D3
esp:CMD
esp:5V
esp:GND.2
esp:TX
esp:RX
esp:GND.3
esp:D1
esp:D0
esp:CLK
led2:A
led2:C
led3:A
led3:C
led4:A
led4:C
pot1:GND
pot1:SIG
pot1:VCC
sw1:1a
sw1:2a
sw1:3a
sw1:4a
sw1:5a
sw1:6a
sw1:7a
sw1:8a
sw1:8b
sw1:7b
sw1:6b
sw1:5b
sw1:4b
sw1:3b
sw1:2b
sw1:1b