๐ Wiring
Connect a push button to input i1 and an LED to output o1.
if asks a question. When the answer is yes, the lines indented under it run. else runs when the answer is no.
setup: loop: if i1 == ON: o1 = pwm(100) else: o1 = 0
๐ก Tip
Notice the 4 spaces before the lines inside if and else. That is how TinkerPy knows which lines belong together.
๐ Your turn
Add a second LED on o2 that is ON when the button is not pressed.