NodeMCU Projects: Difference between revisions

Content deleted Content added
Line 58: Line 58:
import machine
import machine
import time
import time
import urandom


pin = machine.Pin(2, machine.Pin.OUT)
pin = machine.Pin(2, machine.Pin.OUT)
Line 65: Line 66:


while True:
while True:
time.sleep_ms(urandom.getrandbits(8))
for i in range(100,999):
time.sleep_ms(i)
toggle(pin)
toggle(pin)
</syntaxhighlight>
</syntaxhighlight>