RGB LED

Experiments & prototyping with the Arduino.
rwblinn
Site Admin
Posts: 210
Joined: 07 Oct 2017, 12:16

RGB LED

Postby rwblinn » 08 Oct 2017, 18:25

Display various colors using an RGB LED.
The RGB Pins are initialized as MODE_OUTPUT.
The color is set by pin.AnalogWrite(0 - 255).
The B$R source has various subs to set predefined colors, e.g. Red, Green. Blue, Off.

Parts Needed
• 1x Arduino [MEGA used for this experiment]
• 1x RGB LED

Wiring
Arduino MEGA = RGB LED
PWM 3 = RED (Red)
GND = GND (Black) - longest led
PWM 5 = GREEN (Green) -
PWM 6 = BLUE (Blue) - shortest led
(Wirecolor)

Circuit
Image

Download Source Code

Additional Libraries
None

ToDo
• Experiment is completed.

Version
20170108

Return to “Arduino”

Who is online

Users browsing this forum: No registered users and 2 guests