Intro: Computer Controlled RGB Led
Here are some photos of a project I've been working on. Its a RGB Led that can be controlled from my PC. In addition to being able to change its color, I am also able to make it blink at any rate I choose. I started this project a while back but stopped when I got stumped trying to devise a way to send a color over serial connection to my Arduino. I came back to the project after a time and found this article that explained a lot about serial communication. After working out how to send the color to the Arduino I wrote a program in C# so that I wouldn't have to open Serial Monitor and type in a bunch of numbers. All it does is let you select a color and sends it to the Arduino, which updates the LED. Shortly after I made that program, I thought how cool it would be to control the light from my phone! I immediately dived into an ASP.NET web app to do it. That way I could control the LED from a web browser on any computer (or smartphone!) on my home network. This turned out to be way more of an effort than it needed to be, as my inexperience led to all sorts of troubles, but with the help of a friend I was able to get it working. I am very pleased with the result.
If you would like to try this on your own here's how.
-Wire a common anode RGB LED to your arduino by connecting the anode to 3.3V, the red lead to pin 3, the green lead to pin 6, and the red lead to pin 5. Don't forget resistors.
-Download the attached Arduino sketch and upload it to the board (extract it first).
-Open Serial Monitor and type in any of these commands:
0 - Turns the light off
1 - Turns the light on
3xxx/xxx/xxx/ - A three followed by three numbers, each with a slash "/" on the end changes the color of the LED. (Example. 30/255/0/ would turn the light green)
4 - Stops blinking
5xxxx/ - A five followed by a number with a slash "/" at the end causes the LED to blink. The interval between blinks is the number after the five (in milliseconds. 1000 = 1 sec).
Thanks for reading!
FlorianS20 made it!