课程: Raspberry Pi Weekly

免费学习该课程!

今天就开通帐号,24,600 门业界名师课程任您挑!

Red LED, RGB LED, blink, and glow

Red LED, RGB LED, blink, and glow - Raspberry Pi教程

课程: Raspberry Pi Weekly

Red LED, RGB LED, blink, and glow

- Light-emitting diodes, or LEDs, are a convenient indicator. Normally, they can indicate something being on or off, for example, the state of an output pin. But with the addition of Pulse Width Modulation, they can also indicate analog data, such as how fast or how big. Even better, RGB LEDs can be used to demonstrate four dimensions of value, red, green, blue, and pulse. Hi, I'm Mark Niemann-Ross, and welcome to this week's edition of Raspberry Pi Weekly. Every week, we explore the Raspberry Pi and share useful tips. This is an easy project. All you need is some jumper wires, a breadboard, some 270-ohm resistors, a standard LED, and an RGB LED. Start with the one-color LED. It has two leads, one that's longer than the other. The short leg is the cathode. That side will connect to the ground. Connect the other side to the 270-ohm resistor, then to GPIO14 as shown in the handout. Now look at the RGB LED. The longest leg is the cathode, and that also connects to ground. One note: I'm…

内容