Use Scratch 2 to program the Pi to blink the LED.

  • Click the orange "events" block group, then drag and drop the "when (flag) clicked" block over to the "script area" on the right side of the program's interface.
  • Next click the yellow "control" block group section and drag in a "forever" loop.
  • Also from the "control" section, drag in two wait 1 secs blocks.
  • Then click on the "more blocks" block section and drag in two "set gpio to" blocks. Set one block to set gpio to output high. Set the other to set gpio to output low
  • Lastly rearrange the blocks in the order as shown above.

Now click the green flag and see what happens!

This guide was first published on Sep 21, 2019. It was last updated on Sep 21, 2019.

This page (Scratch 2 Blinky) was last updated on Sep 29, 2021.

Text editor powered by tinymce.