As discussed in earlier blog-posts, I will show you how to build an LED controller to be ultimately controlled by the Google Home device. This article is the first in the series that actually talks about the components and we will start with the LEDs connected to our RaspberryPi.
First of all we need some electrical engineering fundamentals (based on https://electronicsclub.info/leds.htm):
I own several red and green LEDs, so I will use them for my demo. Every LED must have a resistor connected in series to limit the current flowing through the LED, to prevent it froming burning out instantly. The Resistor value can be calculated with a simple formular
|R = (VS – VL) / I|
R = resistor value in ohms ().
VS = supply voltage.
VL = LED voltage (2V generally, or 4V for blue and white LEDs).
I = LED current in amps (A)