Holidays are over! So I finally have the time to work on my ColorCam again! I was getting kinda tired of having to set up my circuit with the alligatorclips over and over again. So I took some time to sew all my pieces to a bit of fabric. This saves me a lot of time setting up, and it gives me a nice prototype to work with!
I’m making pretty slow progress on writing the code. I never figured it would be this hard! I have a very good teacher, again thanks Victor, and he explains everything to me, so that I actually know what I’m doing. I take a lot of notes, and make drawings of things, it helps!
But luckily for me, I do make some progress! So far I can push the shutter button, the colorsensor picks up a color and the first pixel shows that color.
I’m happy with having come so far already, but there’s still a lot of work to be done! And there’s some pretty tough stuff coming up.. I think the hardest thing will be the colors. There are 4 neopixels involved on the back of the camera. First is the viewfinder pixel, I want the color of this pixel to look (as much as possible) like the color of the object held in front of the colorsensor. Second are the three pixels beneath the viewfinder. One of these three pixels (which pixel will be randomly picked in each new game) will have the some color as the viewfinder pixel. The other two pixels will have different colors. So there will be 4 pixels on the back, 2 of those will have the exact same color (viewfinder and random other pixel), and the other 2 will have different colors. And this is where it gets tough. There has to be a way to make sure that the two pixels have colors that don’t look too much like that of the first pixel, and don’t look too much like each other. During a nice night under the stars in front of our tent, we came up with an idea, actually a formula.
We had a couple ideas that were soon dismissed because they simply added predetermined numbers to the color values the sensor picked up. But that means that, for example, if you hold your camera in front of a blue object, the other two colors will always be, say green and purple. There is no randomness (is that a word? hmm) in the colorgame. And I want randomness.
Does this picture make any sense to you guys? I hope so.. I don’t know if I can explain it very well. But the point is that the new colors will always be at least 20 degrees from the essential color the sensor picked up, and 40 degrees from each other. And this way the three pixels will have three very different (but still sort of random) colors. And if you hold your camera in front of the samen object twice, only the the color picked up by the sensor will be the same, the other two colors can differ.
The idea comes from my Philips Living Colors lamp. It has this nice round remote with all the available colors in a circle. I’m working with two different systems in colors. Neopixels and color sensor work in RGB, but HSB (hue saturation brightness) works very well for picking the “random” colors. I found a rgb-hsb-rgb converter, so I’m hoping that won’t be a problem.
So this week I’m going to try and see if I can fit my color ideas in my project. I’m pretty nervous about this, it’s really difficult for me! And I’m hoping that if I can pull this off, the rest won’t be as hard.. Fingers crossed!!
Every Wednesday is Wearable Wednesday here at Adafruit! We’re bringing you the blinkiest, most fashionable, innovative, and useful wearables from around the web and in our own original projects featuring our wearable Arduino-compatible platform, FLORA. Be sure to post up your wearables projects in the forums or send us a link and you might be featured here on Wearable Wednesday!
Have an amazing project to share? Join the SHOW-AND-TELL every Wednesday night at 7:30pm ET on Google+ Hangouts.
Join us every Wednesday night at 8pm ET for Ask an Engineer!
Learn resistor values with Mho’s Resistance or get the best electronics calculator for engineers “Circuit Playground” – Adafruit’s Apps!
Maker Business — “ORANGE PI: MEETING WITH STEVEN ZHAO IN SHENZHEN”
Wearables — Design with IFTTT
Electronics — Keep track of those rails!
Biohacking — Why Our Eyes Cannot Look at a Solar Eclipse
No comments yet.
Sorry, the comment form is closed at this time.