Alan numitron clock
SNES Pi Webserver
USB Volume/USB toys
SNES Arcade cabinet
Game boy projects
Home Presence Detector
Rand Nerd Tut
Carnet du maker (fr)
ATmel blog (defunct)
A novelty, a small item you put at some place and it detects the color of what it has been placed on and change its color accordingly.
How it works : light something with 3 different color and measure how much light is reflected. If you have taken provision in advance (and stored in in the EEPROM memory) the answer to pure white and pure black in the red, green and blue color component, map your results to that interval, make it a ratio on [0;255] scale : you got your PWM value for that component.
See it like a 2 parts item : bottom contains a CdS and a RGB led to light and "read" each color (R/G/B), a top part that would change color with a RGB led to "show" the color that was read. The bottom part would light up 1 sec every n sec to check the color and amend the RGB color at the top.
Notabene : dam#### when you have a good idea, there's always someone who had the same just before ...
20111219 : one evening of this and that, I'got on my arduino (prototype) a reading of default balance saved in EEPROM. The readings now are not always consistent nor great but seem to go in the right direction however. A bit more tuning and maybe I'll have something working as a prototype.
201112xx: Now it's packed in a recycled salt tube, looks like a wand, it became a CameleonWand ! Working not too bad, except for the greenish stuffs. Reds are nicely detected, blue too, green aren't. I must have failed something somewhere for sure...
20120207: saw some other projects of that kind on the net today, but using a color detector instead of a simple inexpensive CdS. This is the site. Should put a picture or video of mine someday...
on google code. This one is poorly documented I have to admit, sorry. But since it's not very complex, should be ok I hope.
You might (quite sure) want to change the values that are stored in the EEPROM that are my sample results to pure white and pure black, I think it's a key to a better result. Also I tried to rebalance the color roughly by affecting some wheight to the RGB components when I display the color, you might also want to reconsider that...
Nothing complex here.
I: CdS and the reading led. II: Show led, also RGB. III: on switch (pushbutton). Board is a Rapide328.
All content on this site is shared under the MIT licence (do what u want, don't sue me, hat tip appreciated)
electrogeek.cc ~ Formerly known as Kalshagar.wikispaces.com (AlanFromJapan [2009 - 2018])