Pi GPIO PWD LED: Difference between revisions

From XPUB & Lens-Based wiki
No edit summary
No edit summary
Line 8: Line 8:
The way to change the brightness of an LED in digital electronics (only binary values are used 0v-5V or 0V-3.3V and no values in between), consists in creating a square waves that changes rapidly between 0V and 3.3V. By changing the portion of the time when the signal is on (3.3V) versus the time that the signal is off(0V) we can change the intensity of the LED.  
The way to change the brightness of an LED in digital electronics (only binary values are used 0v-5V or 0V-3.3V and no values in between), consists in creating a square waves that changes rapidly between 0V and 3.3V. By changing the portion of the time when the signal is on (3.3V) versus the time that the signal is off(0V) we can change the intensity of the LED.  
This technique is called Pulse Width Modulation (PWM), as we are modulating the "on" width of the wave.
This technique is called Pulse Width Modulation (PWM), as we are modulating the "on" width of the wave.
[[File:pwm.png]]
[[File:breathingLed01.png]]


https://www.admfactory.com/breathing-light-led-on-raspberry-pi-using-python/
https://www.admfactory.com/breathing-light-led-on-raspberry-pi-using-python/


https://www.admfactory.com/rgb-led-on-raspberry-pi-using-python/
https://www.admfactory.com/rgb-led-on-raspberry-pi-using-python/

Revision as of 13:52, 22 October 2018

How to change the brightness of an LED using the Pi's GPIO pins?

setup and testing

Start by following the basic setup and testing of the Pi's GPIO in RaspberryPi_GPIO


PWD

The way to change the brightness of an LED in digital electronics (only binary values are used 0v-5V or 0V-3.3V and no values in between), consists in creating a square waves that changes rapidly between 0V and 3.3V. By changing the portion of the time when the signal is on (3.3V) versus the time that the signal is off(0V) we can change the intensity of the LED. This technique is called Pulse Width Modulation (PWM), as we are modulating the "on" width of the wave.

Pwm.png


BreathingLed01.png


https://www.admfactory.com/breathing-light-led-on-raspberry-pi-using-python/

https://www.admfactory.com/rgb-led-on-raspberry-pi-using-python/