# LED Brightness control using Potentiometer
from machine import ADC,Pin
from time import sleep
led_blue=Pin(12,Pin.OUT)
switch=Pin(27,Pin.IN)
led_red=Pin(14,Pin.OUT)
pot=ADC(Pin(15))
while True:
x=pot.read()
y=switch.value()
if(y==1):
led_red.value(1)
else:
led_red.value(0)
led_blue.value(1)
sleep(x/1000)
led_blue.value(0)
sleep(x/1000)
esp:VIN
esp:GND.2
esp:D13
esp:D12
esp:D14
esp:D27
esp:D26
esp:D25
esp:D33
esp:D32
esp:D35
esp:D34
esp:VN
esp:VP
esp:EN
esp:3V3
esp:GND.1
esp:D15
esp:D2
esp:D4
esp:RX2
esp:TX2
esp:D5
esp:D18
esp:D19
esp:D21
esp:RX0
esp:TX0
esp:D22
esp:D23
led1:A
led1:C
led2:A
led2:C
pot1:GND
pot1:SIG
pot1:VCC
btn1:1.l
btn1:2.l
btn1:1.r
btn1:2.r
vcc1:VCC