repeat(3): runs the indented lines 3 times. Here the LED blinks 3 times when the board starts, then o2 stays on.
setup: repeat(3): o1 = pwm(100) wait(300) o1 = 0 wait(300) loop: o2 = pwm(100)
Variables remember numbers
A variable is a box with a name that holds a number. Here speed grows by 10 each time.
setup: loop: speed = 0 repeat(10): speed = speed + 10 o1 = pwm(speed) wait(200)
🚀 Your turn
Change it so speed grows by 20 and repeats only 5 times.