import machine
from machine import Pin
from time import sleep
led = Pin (23, Pin.OUT) #GPIO14 as output for LED
led.value(1) #LED is ON
sleep(5) #delay of 1 second
led.value(0) #LED is OFF
#sleep(5) #delay of 5 second
print('------------ VAIG A DORMIR ------------')
machine.deepsleep (10000) #10000 ms sleep time
#Un cop passats els 10 segons, ESP es despertara i es reiniciara