User Tools

Site Tools


rpiwiki:fadingrgbled

Arduino RGB LED Fade

I have used Arduino in the past during eighth grade exploratory week last year where we were each given one to play around with. I have been using it a bit since then. Arduino is a great prototyping platform for electronics that is very user friendly.

I am currently finishing up a project using RGB LEDs which can change to any color requested by the program. While working on it I acquired a second RGB LED when I connected this one in parallel the first light continued as usual, however the second one was using different colors. I researched it and learned that RGB LEDs are controlled by 4 different pins. Depending on the type the one pin is the constant power input and the other 3 pins have the opposite polarity from the first pin. This way when power is applied the the last three pins the colors will change based on the diffrent pins that are powered the color changes. The concept is pretty close to mixing paint because you are mixing the three primary colors in light form together.

At Science Fair I worked on it some more with Kyle Gagner we came up with a program based off of the original one that I created. This new version has a much smoother color transition between all of the colors of the rainbow. When we tried to upload it to the Arduino the PC couldn't see the Arduino Controller. After many PC reboots and much Google searching we never found a solution because it just started working for no apparent reason. It still dosen't work very well though it seems to be a issue with my PCs COMM ports interfacing with the Arduino and the programming software.

Here is a video of it in action! http://youtu.be/qeUitTTWc2E

The code can be found here:

RGB Fading Code v.1

(Kyle Gagner would like to say this code is horribly messy(Jacob would like to disagree.)

rpiwiki/fadingrgbled.txt · Last modified: 2019/03/21 14:39 (external edit)