The key feature being the colour is selected by clicking on an image, the RGB value of the pixel you click on is processed and sent to the audrino which then outputs that same value.
Obviously the match isn't perfect especially at darker colours as I'm yet to see any LED do black very well, but the project should hopefully provide some insight to those of you starting with arduino and other microcontrollers.
Feel free to ask any questions in the comments and I'll answer them as best i can.
Also as i am new to instructable publishing let me know any improvements i could make on this or future instructables.
Video below shows the final result: (if it wont play right click and go to watch in youtube)
Remove these ads by
Signing UpStep 1: What You Need
Arduino or similar
1 x RGB led (Dispersed, i used some super fine sand paper as the one i had was water clear)
4 x Connection Wires
1 x Breadboard
3 x Resistors if you plan to leave this on for extended periods.
use this tool to calculate resistors specific to your LED led.linear1.org/led.wiz
Software:
Arduino
Processing
(This can be done in other software packages but this instructable is to get people started with arduino)





































Visit Our Store »
Go Pro Today »




"The file "RGBR.png" is missing or inaccessible, make sure the URL is valid or that the file has been added to your sketch and is readable."
It breaks at
image(img,0,0);
Anyone had this problem, before? Thank you!
If you apply the maximum power to the LEDs, with 5V output, I'm afraid they won't live long.
You'll have to determine the proper resistor for each colour, as each LED type has it's own workiing voltage.
Running an LED without a current limiting resistor only works if the die has a built-in constant current source. Some blinking LEDs are built that way, although the three-color LED apparently is not.
Thank you,
https://gist.github.com/1521148
arduino's serial port will be whatever your COM port for uploading the file will be
on processings side the index will changed based on your OS and how many things you have plugged in
on OSX you will get many com ports (usually between 5 and 8 depending on whats plugged in) look for the first one that has TTY in it's property
on PC they will show up as COM1, COM4...
good starting project on communications between software and hardware.
"error: 'import' does not name a type In function 'void setup()':
In function 'void draw()':
In function 'void mousePressed()':"
Anyone know this means? Thanks for any help!
second I played a little with your code and the code found here to add some twitter to the mix.. now I can use twitter to change the color of my lamp!
just tweet: @colormelamp <color of you choice>
supported colors: red, green, blue, cyan, yellow, magenta & white.
(actually it doesn't matter what's in the message as long as it contains "@colormelamp" and a color)
my code is pretty cruel but it works. the code on the arduino is the same, you'll just have to set the usb port.. the rest should work.. if your gonna try it you could use the same twitter account I used that way our lamps would have the same color!
processing code here
(you can leave the password and username as they are, there not needed)
tell me what you think!
ps. this was my first Processing and third Arduino project so sorry if it doesn't make sense.. :P
go to processing.org it is a program named processing
place the image in a folder named 'data' in the same directory as your processing file.
myPort = new Serial(this, Serial.list()[0], 9600);
is that your com port
-anode should be connected to a voltage supply not ground
-and, your analog outs in the arduino code should be 255-(what they are now)
thanks for reading
thanks for reading