|Printed by:||Guest user|
|Date:||Saturday, 25 March 2023, 2:29 PM|
Learn the simplest thing you can do with a GrovePi: Blink a LED.
The blinking LED is the hardware version of the software world’s “Hello World” program. Once mastered, you can move on to more complicated projects like connecting a display or other sensors to the Raspberry Pi.
This example is meant to be your first project with the GrovePi. All of the parts used in this project are available in the GrovePi Starter Kit.
2. Hardware Needed
All of the hardware comes with the GrovePi starter kit. Specifically, for the Raspberry Pi LED Tutorial, you’ll need:
- The Raspberry Pi
- Grove LED
- One Grove Connection wire
3. Hardware Setup
Connecting the LED to the Raspberry Pi
Connect the LED to Port D4 and power on the Raspberry Pi, using the Grove wire connector.
Running the Program:
The example program for this project is shown below. To run the program, change directory on your Raspberry Pi to the GrovePi/Software/Python folder.
Run the grove_led_blink.py python program:
sudo python grove_led_blink.py
The Grove LED will start blinking.
The source code for the example can be found here.
Have a question or a problem? Post it on the forums and we’ll help you out.