Blinky LED demo

We will now put together a small demo using the Pi and some components. In this simple demo we will use Scratch to program the Pi to blink an LED.

Wiring

First, let's wire things up.

You will need handy:

  • one led (any color)
  • one resistor that is 1K or less (click here for more on how to determine resistor values)
  • 2 female to male jumper wires
The above photo from Fritzing is a Raspberry Pi 3 because at the time of this guide writing, there is no Pi 4 Fritzing object, but the pinout is identical
  • Connect one female to male jumper wire from GPIO pin 2 on the pi to any spot on a bread board
  • Next, connect the resistor (1K or less will do) from the GPIO 2 jumper wire to another spot on the breadboard
  • Now take the LED and determine which leg is longer, and connect that leg to the other end of the resistor with the opposite end going to another spot on the bread board.
  • Lastly, connect male to female jumper wire from the unconnected end of the led to a ground pin on the Pi.

Next we'll program the Pi in scratch to blink the LED.

Going Further

What else can you think of to use with Scratch and Raspberry Pi?

Some ideas:

  • Add buttons and other components.
  • Create a custom interactive game by connecting buttons, leds and other components. Then program these components to control and react to game elements like sprites and backdrops.
  • Add a CRICKIT HAT to make things move!

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

This page (Wiring) was last updated on Mar 08, 2024.

Text editor powered by tinymce.