Fading LED
Site: | GoLabs |
Course: | Fading LED |
Book: | Fading LED |
Printed by: | Guest user |
Date: | Saturday, 7 December 2024, 4:43 AM |
Description
This project shows how to fade a LED with the Raspberry Pi.
1. Introduction
This project shows how to fade a LED with the Raspberry Pi. We cover the hardware and software setup in which we connect the GrovePi to a rotary angle sensor (a fancy name for a potentiometer). The Raspberry Pi reads the analog value and dims or fades the PWM to the LED which sets the LED’s intensity. The LED is dimmed using the potentiometer.
2. Setting up the Hardware
Simply plug the LED Module in Port D5 and the Rotary Encoder in Port A0. That’s it.
3. Running the Program
Go to the LED fade example folder:
1
cd GrovePi/Projects/LED_Fade/
Run the LED fade script: