workshops:arduino_for_the_curious:stage_4
Differences
This shows you the differences between two versions of the page.
workshops:arduino_for_the_curious:stage_4 [2017-04-05 12:52] – external edit 127.0.0.1 | workshops:arduino_for_the_curious:stage_4 [2017-04-10 11:28] (current) – Simon | ||
---|---|---|---|
Line 11: | Line 11: | ||
So our RGB LED is essentially 3 LEDs in one - a red one, a green one and a blue one. By turning on certain combinations of these LEDs we can create lots of different colours. But first... how do we connect them to the Arduino? | So our RGB LED is essentially 3 LEDs in one - a red one, a green one and a blue one. By turning on certain combinations of these LEDs we can create lots of different colours. But first... how do we connect them to the Arduino? | ||
- | RGB LEDs typically have 4 leads. The longest one is the common positive lead shared by each color of LED. The other 3 leads are the 3 negative leads of each of the red, green and blue LEDs inside. Like normal LEDs, RGB LEDs need resistors in series to stop too much current passing through. Again 100-300 ohms is good, and you'll need 3 of them. | + | RGB LEDs typically have 4 leads. The longest one is the common positive lead shared by each colour |
Connect your RGB LED to your Arduino using the breadboard. | Connect your RGB LED to your Arduino using the breadboard. | ||
Line 20: | Line 20: | ||
Since each LED is connected to the Arduino with at its negative lead, the control for this LED is the opposite to the previous LEDs. In order to turn the LEDs on, you need to set the corresponding pins to the LOW (0V) value. | Since each LED is connected to the Arduino with at its negative lead, the control for this LED is the opposite to the previous LEDs. In order to turn the LEDs on, you need to set the corresponding pins to the LOW (0V) value. | ||
- | | {{workshops: | + | | {{workshops: |
Line 34: | Line 34: | ||
PWM is achieved in Arduino through the analogWrite function. Instead of telling you how to do it though, we thought we'd get you to use the official Arduino documentation. It's useful stuff! | PWM is achieved in Arduino through the analogWrite function. Instead of telling you how to do it though, we thought we'd get you to use the official Arduino documentation. It's useful stuff! | ||
- | | {{workshops: | + | | {{workshops: |
workshops/arduino_for_the_curious/stage_4.1491396766.txt.gz · Last modified: 2017-04-05 12:52 by 127.0.0.1