๐ Wiring
Connect an LED to output o1.
To switch o1 on, give it power with pwm(100) โ that means 100% power. To switch it off, set it to 0.
wait(500) makes the board wait for 500 milliseconds โ that is half a second.
from tinkerpy_mega import * def setup(): pass # your code goes here def loop(): write_output(o1, pwm(100)) wait(500) write_output(o1, 0) wait(500)
๐ก Tip
Press Run on the simulator first โ you will see the LED blink on screen before you even plug in the board.
๐ Your turn
Make it blink faster (try wait(100)) and then slower (try wait(2000)).