top of page

Piper Quick Guides

Blink Project
Introduction

This is the introductory project to learn how to use the program editor and programming concepts. Students will build a simple circuit and write code to make an LED light blink on and off.

Concepts

Students will need to remember the micro controlling electronics concept that each GPIO pin on the Raspberry Pi has a number. They learn that they need to create PiperCode to control the GPIO pins on their breadboard and that will control what happens to their LED light output.  They will write a repeat forever loop with code blocks inside to turn the light on, wait, then turn off, to blink the LED.

Electronic Parts:

LED (green), Wires (1 blue, 1 yellow), Breadboard

Screen Shot 2020-01-13 at 10.45.45 AM.pn
GPIO Setup:

LED, Pins 39, 37 (back row)

Troubleshooting

The most common mistakes students make is to have the incorrect pin number in the code. Also make sure that they are first turning ON the pin, then turning it OFF.  

 

The code ‘wait 2500 ms’ is in milliseconds where 1 second = 1000 ms. The light turns on, stays on for 2.5 seconds, then goes off. The puzzle piece where 1000 and 2500 are entered is called a “variable”.

​

The LED must be inserted properly into the breadboard to work, the short leg (called a Lead) lines up with the jumper wire connected to Pin 21. The longer leg connects to Pin 22 with a jumper wire and it provides power to the LED, and that is the one controlled with code.

Code Solution:

BlinkProject_QuickGuide_Code.png
bottom of page