diy ambient orb with arduino update <77> comment page 3

Posted on Feb 5, 2014

The hardware is just an Arduino board connected via USB to a laptop. The Arduino appears as a serial device to the computer. On the Arduino board, three LEDs (red, green, blue) are mounted directly to the Arduino board using a prototyping shield like this DIY one. The schematic is quite simple: The code sketch running on the Arduino board is a slightly modified version of

diy ambient orb with arduino update <77> comment page 3
Click here to download the full size of the above Circuit.

the one presented in the last Spooky Arduino class. Instead of parsing single color values over the serial port, it expects a full RGB color value in standard web format of #RRGGBB  (white is #ffffff , blue is #0000ff , and so on). The sketch parses that seven character string into three bytes: one each for the brightness values of the red, green and blue LEDs. To bridge between the Arduino and the Net, a small Processing sketch was created that uses the standard Java class to fetch a web page (really, a text file on a web server) containing a line with a color value in the format #RRGGBB . The sketch parses the color value, sends the value out to the Arduino orb using the Processing Serial library, and then sets its own background color to match. Because I`ve set the framerate of the sketch to 1 fps, it takes a second for the background to match the orb. I did this on purpose so I could get a sense of the color as the orb reproduces it before seeing it as it truly is. I was surprised how well the two tended to match! I have some PHP code that I wrote to display glanceable weather info on a Chumby. I`m trying to replicate the behavior of my Ambient Weather Beacon. Thought y`all might like to experiment with it in conjunction with this project. The code grabs today`s temp using Yahoo`s APIs and maps the temp to an RGB color. After 3pm, it should display tomorrow`s temp (you may need to localize it). I haven`t really...

Leave Comment

characters left:

New Circuits



Popular Circuits

Mobile Phone Charger with CA3130
Hi Fi headphone amplifier circuit diagram
Schematic Diagram 100W 2x LM3886 Audio Power Amplifier
sms based device control using at89s52 amp nokia 3310
3-D Depth Finding Imager with Digital Readout
Simple Schematic for VCA mixer
How To Build A Simple Code-Operated Switch