element14 Community
element14 Community
    Register Log In
  • Site
  • Search
  • Log In Register
  • Community Hub
    Community Hub
    • What's New on element14
    • Feedback and Support
    • Benefits of Membership
    • Personal Blogs
    • Members Area
    • Achievement Levels
  • Learn
    Learn
    • Ask an Expert
    • eBooks
    • element14 presents
    • Learning Center
    • Tech Spotlight
    • STEM Academy
    • Webinars, Training and Events
    • Learning Groups
  • Technologies
    Technologies
    • 3D Printing
    • FPGA
    • Industrial Automation
    • Internet of Things
    • Power & Energy
    • Sensors
    • Technology Groups
  • Challenges & Projects
    Challenges & Projects
    • Design Challenges
    • element14 presents Projects
    • Project14
    • Arduino Projects
    • Raspberry Pi Projects
    • Project Groups
  • Products
    Products
    • Arduino
    • Avnet & Tria Boards Community
    • Dev Tools
    • Manufacturers
    • Multicomp Pro
    • Product Groups
    • Raspberry Pi
    • RoadTests & Reviews
  • About Us
  • Store
    Store
    • Visit Your Store
    • Choose another store...
      • Europe
      •  Austria (German)
      •  Belgium (Dutch, French)
      •  Bulgaria (Bulgarian)
      •  Czech Republic (Czech)
      •  Denmark (Danish)
      •  Estonia (Estonian)
      •  Finland (Finnish)
      •  France (French)
      •  Germany (German)
      •  Hungary (Hungarian)
      •  Ireland
      •  Israel
      •  Italy (Italian)
      •  Latvia (Latvian)
      •  
      •  Lithuania (Lithuanian)
      •  Netherlands (Dutch)
      •  Norway (Norwegian)
      •  Poland (Polish)
      •  Portugal (Portuguese)
      •  Romania (Romanian)
      •  Russia (Russian)
      •  Slovakia (Slovak)
      •  Slovenia (Slovenian)
      •  Spain (Spanish)
      •  Sweden (Swedish)
      •  Switzerland(German, French)
      •  Turkey (Turkish)
      •  United Kingdom
      • Asia Pacific
      •  Australia
      •  China
      •  Hong Kong
      •  India
      •  Korea (Korean)
      •  Malaysia
      •  New Zealand
      •  Philippines
      •  Singapore
      •  Taiwan
      •  Thailand (Thai)
      • Americas
      •  Brazil (Portuguese)
      •  Canada
      •  Mexico (Spanish)
      •  United States
      Can't find the country/region you're looking for? Visit our export site or find a local distributor.
  • Translate
  • Profile
  • Settings
Get Closer Wearables Design Challenge
  • Challenges & Projects
  • Design Challenges
  • Get Closer Wearables Design Challenge
  • More
  • Cancel
Get Closer Wearables Design Challenge
Blog Flora ColorCam: it all about the colors
  • Blog
  • Forum
  • Documents
  • Files
  • Mentions
  • Sub-Groups
  • Tags
  • More
  • Cancel
  • New
  • Share
  • More
  • Cancel
Group Actions
  • Group RSS
  • More
  • Cancel
Engagement
  • Author Author: linkaspers
  • Date Created: 20 Aug 2013 8:42 AM Date Created
  • Views 813 views
  • Likes 2 likes
  • Comments 3 comments
  • flora
  • get_closer_challenge
  • Wearables
  • adafruit
  • arduino
  • get_closer
  • beginner
Related
Recommended

Flora ColorCam: it all about the colors

linkaspers
linkaspers
20 Aug 2013

Holidays are over! So I finally have the time to work on my ColorCam again! image

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!

 

image

 

As of yesterday I also have a working Flora board. I had some trouble getting the Flora to update my code, I kept getting these errors. A small chip on the Flora didn't lay flat on the surface as it was supossed to, but it stood on an end. Victor, my boyfriend, took up his soldering iron and fixed it for me. Now, the updating goes pretty fast and smooth. Thanks Vic! image

 

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! image

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 image

 

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 image

 

So here's the latest idea:

image

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!!

  • Sign in to reply
  • billabott
    billabott over 12 years ago in reply to zengirl2

    I would use the digits in an irrational number like PI to select which led to turn on and off in the sequence.  image

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • More
    • Cancel
  • zengirl2
    zengirl2 over 12 years ago

    I like the idea of randomness.  I'm not sure I understand your diagaram, but it kind of reminds me of a colorwheel, and maybe that is what the Philips company was also shooting for?  Either way it seems like a fun way to get some other colors in there.  Also crossing my fingers for you.  BTW, tried to do some work in Cape May, but too much going on with the family LOL.

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • More
    • Cancel
  • DAB
    DAB over 12 years ago

    Hi Linda,

     

    I think I understand your diagram.

    You want to phase the color changes around your circuit so that the color flows around the circumference.

     

    You might want to think about building a look up table.  That way you can control the transitions and still enable the system to start at random points within the set.  A LUT will cut down the amount of real time processing you might need to day to maintain your sequences.

     

    Cool idea.

    DAB

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • More
    • Cancel
element14 Community

element14 is the first online community specifically for engineers. Connect with your peers and get expert answers to your questions.

  • Members
  • Learn
  • Technologies
  • Challenges & Projects
  • Products
  • Store
  • About Us
  • Feedback & Support
  • FAQs
  • Terms of Use
  • Privacy Policy
  • Legal and Copyright Notices
  • Sitemap
  • Cookies

An Avnet Company © 2025 Premier Farnell Limited. All Rights Reserved.

Premier Farnell Ltd, registered in England and Wales (no 00876412), registered office: Farnell House, Forge Lane, Leeds LS12 2NE.

ICP 备案号 10220084.

Follow element14

  • X
  • Facebook
  • linkedin
  • YouTube