3 Simple Ways to
Share What You Make

With Instructables you can share what you make with the world — and tap into an ever-growing community of creative experts.

PhotosPhotos

Share one or more photos of a project, recipe, or whatever you've made, quickly and easily.

Step by StepStep-By-Step

Share your step-by-step photos with text instructions of what you made so others can do it too!

VideoVideo

Share your how-to video. You'll need your embed code from a video site such as YouTube.

RGB's with Arduino and Processing

RGB\
Here is an easy(enough) project to introduce you to the Arduino microcontroller, as well as Processing. This is my first Arduino and Processing project and I didn't have too much bother getting it working.

This is my entry to the Sparkfun Microcontroller contest so if you think it's good, please vote!!(voting starts the 14th feb). Thanks!!

 Once everything is set-up, you will be able to control the color of the RBG's from your computer, using the Processing program, and also see the output color in the program( it ain't perfect but it's handy if you want this for remote lighting)

Below is a screenshot of the Processing executing. By clicking (and/or holding) on the up and down arrows, you can change the color levels of each of the colors in the RGB.

 
Remove these adsRemove these ads by Signing Up
 

Step 1Equipment

A computer with Arduino and Processing. Try to get the most up-to-date release
http://arduino.cc/en/Main/Softwar e and http://processing.org/download/

An Arduino(make sure it has PWM outputs, which is all/most)

RGB Led's

Resistors(100x2 ,180x1)

Jumper wires

Breadboard

USB cable(for the Arduino)

If you are using more than one RGB, you may need to calculate the different values for the resistors. Follow this tutorial http://www.sparkfun.com/tutorials/219 or use this site http://led.linear1.org/led.wiz to calculate the required resistances.

« Previous StepDownload PDFView All StepsNext Step »
15 comments
Jul 16, 2011. 1:56 PMNman120 says:
in your processing code download there is an error that I found:

in the text for over the arrow buttons:
text(s, 30, 100, 40, 20);

the end 20 needs to be 30 or else only the blue shows up. great program though
Jun 7, 2011. 7:00 AM32teeth says:
as for your pin mapping to the PWM pins.
i would recommend using 9,10,11 since they are next to each other.
just a thought

good stuff
Feb 20, 2011. 8:16 AMRPKH says:
Is there a specific reason why you have chosen to send the values for r,g,b over the serial instead of using the arduino library in processing?
Feb 2, 2011. 6:04 PMbeverageexpert says:
I am getting an error in processing
saying it cannot load this font AngsanaNew-25.vlw

then this line is highlighted
font = loadFont("AngsanaNew-25.vlw"); // import the font(tools->create)

Feb 3, 2011. 11:16 AMbend says:
the answer is in your comment, go to tools, then create font, then choose AngsanaNew and make it size 25 then click "ok" and try to run the code again
Feb 1, 2011. 3:23 AMtigerbomb8 says:
i would vote but i can not see this in the contest page
Feb 1, 2011. 6:47 PMtigerbomb8 says:
cool and why did you put thins in the micro controllers section there is an arduino section
Feb 2, 2011. 5:31 AMtigerbomb8 says:
you can move it

Pro

Get More Out of Instructables

Already have an Account?

close

All Steps Viewing
View all steps of an Instructable on the same page when you're a Pro Member.

Upgrade to Pro today!
2
Followers
1
Author:nazdreg2007