This is a very simple project, ideal for kids as it uses Scratch, a visual programming environment which is great to start learning about programming. It will see you through some basics of using a Raspberry Pi, programming and circuit making.
You should start the project with an already set-up Raspberry Pi running the latest noobs. You can learn how to do that here.
![1. Prepare LED connections](https://www.okdo.com/wp-content/uploads/2019/10/step-1.png)
- Connect a jumper wire to the positive (longer) leg of the LED and to any leg of the 3.3K Ohm resistor
- Connect another jumper wire to the other leg of the 3.3K Ohm resistor
- Connect a jumper wire to the negative (shorter) leg of the LED
It doesn’t matter which colour jumper wires you use, but for clarity, it’s a good idea to use black for negative and red for positive polarities.
Ensure that the resistor is connected to the positive leg of the LED
![Led on](https://www.okdo.com/wp-content/uploads/2019/10/step2.png)
- Connect mouse, keyboard and monitor to the Raspberry Pi and power it up. You can learn how to do it here
- Connect the jumper wire attached to the resistor to the 3V3 pin (top left) on the Raspberry Pi
- Connect the other jumper wire attached to the resistor to the GND pin (3rd right) on the Raspberry Pi
Your LED should now be on.
This was a quick test to ensure that everything works fine.
![Led off](https://www.okdo.com/wp-content/uploads/2019/10/step2b.png)
- Disconnect the jumper wire attached to the resistor from the 3V3 pin
- Connect the jumper wire attached to the resistor to pin GP25 (11 on the right column)
![Navigate to scratch 2](https://www.okdo.com/wp-content/uploads/2019/10/step3a.jpg)
- Navigate to the Raspberry icon on the top left of your Raspberry Pi’s desktop and open “Scratch 2” from the “Programming“ menu
![Add extension](https://www.okdo.com/wp-content/uploads/2019/10/step3b.jpg)
- Ignore the cat
- Click on “More Blocks”
- Click on “Add an Extension”
![Pi GPIO](https://www.okdo.com/wp-content/uploads/2019/10/step3c.jpg)
- Select “Pi GPIO” and click “Ok”
![4. Programme LED](https://www.okdo.com/wp-content/uploads/2019/10/step4.jpg)
- From the “Events” menu in Scratch 2, drag “when clicked” into the right-hand panel
![4. Programme LED](https://www.okdo.com/wp-content/uploads/2019/10/step4b.png)
- Drag “repeat” from the “Control” menu and attach it to “when clicked”
![4. Programme LED](https://www.okdo.com/wp-content/uploads/2019/10/step4c.png)
- Drag “set gpio” from the “More Blocks” menu into “repeat”. Select “25” from the “set gpio” dropdown
![4. Programme LED](https://www.okdo.com/wp-content/uploads/2019/10/step4d.png)
- Drag “wait secs” from the “Control” menu and place it under “set gpio”
- Drag another instance of “set gpio” into position and set it to GPIO “25” and “output low”
- Drag another instance of “wait 1 secs”
You’re all set!
![Click the green flag](https://www.okdo.com/wp-content/uploads/2019/10/step5.jpg)
- To see your programme in action , click on the green flag on the top right of the Scratch 2 preview window
Your LED should now be flashing on and off every second.
You can experiment with different timings by changing the “wait” timings.
![Blinking LED](https://www.okdo.com/wp-content/uploads/2019/10/Blinking-LED.gif)