from machine import Pin import time _init() LedPin = 15 led = Pin(LedPin, Pin.OUT) adc = machine.ADC(0) while True: value = adc.read() led.on() time.sleep_ms(value) led.off() time.sleep_ms(value)