element14 Community
element14 Community
    Register Log In
  • Site
  • Search
  • Log In Register
  • About Us
  • 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 Boards Community
    • Dev Tools
    • Manufacturers
    • Multicomp Pro
    • Product Groups
    • Raspberry Pi
    • RoadTests & Reviews
  • 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: fun and frustration!
  • 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: 22 Sep 2013 9:36 AM Date Created
  • Views 1024 views
  • Likes 1 like
  • Comments 3 comments
  • flora
  • get_closer_challenge
  • Wearables
  • wearable_tech
  • adafruit
  • arduino
  • get_closer
  • beginner
Related
Recommended

Flora ColorCam: fun and frustration!

linkaspers
linkaspers
22 Sep 2013

image

 

My boyfriend Victor showed me this cartoon once and I thought it was funny, but I didn't quite get it. Last week, when he was listening to me trying to program my Flora for a few hours in a row, he showed it again. This time I got it. This is exactly how it works! Although the Hurray!!!!-part doesn't last for ten minutes.. And the depressing-puzzle-part lasts for about two hours.. Frustrating! And the weirdest part is: I'm still having fun!

 

Struggling with colors

I made quite some progress last week. And I'm pretty happy with the results so far. What you see in the pictures below is my (seemingly never-ending) struggle to try and make sure the colors picked up by the colorsensor are close enough to be recognised when they show up in the pixels.

When first I tried to make this work, the colors were all off. Green was yellow, blue was orange.. weird! In the Google+hangout, Becky came up with the idea of having the colorsensor take multiple readings and then taking the average as the color. It worked, it made the colors more similar to the color of the different objects I used, but still.. not close enough. In the pictures below you can see the difference.

If you could ignore the green pixel, it's a preprogrammed color for one of the pixels that eventually gets a random color. Yeah yeah, it's on my to-do-list!

In every picture the pixel on the left shows the color after taking 5 measurements and then picking the average. It's not very bright as you can see.

And then every picture has one pixel that's bright and has a color similar to the Legobrick next to it. Hurray! This is the fruit of hard work and a lot of nights of trial and error!

What we did: take the average of 5 measurements, convert it to HSV, pump up the saturation to maximum and convert back to RGB. Victor found the converter on: www.stackoverflow.com. We came up with the idea of HSV when we were thinking about a way to pick 'random' colors that aren't too much like the original color (the one the sensor picked up) and each other (you can read about this here). And when we were thinking of ways to make the colors brighter, this is what we came up with.

The colors aren't perfect, but they're certainly better than they were! We're still experimenting with the dark colors and white, those are the toughest!

 

imageimageimage

 

Game mode on!

Aside from playing with the colors from the color sensor, I also had a bit of fun coming up with ideas for the actual game! It had to involve at least some colors of course image First I made sure that the buttons made from conductive fabric worked. And I must say they work excellent! It's such fun to include those in my project! And real easy too. So the game works.. You can touch the button that corresponds with the same color as the viewfinder pixel and you'll see a very nice green 4-pixel-lightshow (I had so much fun writing the code for this bit, it's so nice to know what you're doing and immediately see it in the pixels!). If you'd touch one of the other buttons, you'd see 4 red pixels. I asked my 5 year-old to play the game and this is what happened when he touched the wrong button! He also got it right, but I'll have to make a video to show you later on.

image

 

On sewing

I've also sewn together my actual camera. This is familiar territory, so it went pretty smooth. All soft foam and wool felt and a bit of wood too image I used the wood to keep some buttons in place, so the kids can push the button and it won't dissappear in the foam.

I won't spoil the fun by showing the entire camera to you guys now. But I'll allow a small sneek-peak image And yes, of course I'll show you the whole thing at the end of the challenge!

image

 

Thanks for reading! Any comments and/or suggestions are welcome as always!

Linda

  • Sign in to reply

Top Comments

  • DAB
    DAB over 11 years ago +1
    Hi Linda, Good update. One of the best methods I have found to help pull yourself out of a coding problem is to sit down and try to explain to someone else what the program is supposed to do. Nine times…
  • zengirl2
    zengirl2 over 11 years ago in reply to linkaspers

    It's very cool to see your update and I so admire your language capabilities -- can't wait to take a C++ course as most of my issues are coming from the programming side.   I really connect with the cartoon except that there is usually about 4-5 hours in between my issues/researching before the "victory" pose.  Anyway, I love seeing your son in the pic playing with the game.  I really think this is something that a children's toy company would want to get into -- soft and tech.  Looking forward to seeing the action video.

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

    He DAB,

     

    Thank you for understanding and sharing!

    I'm proud to say I got myself out of a few coding problems image I still couldn't do it without Victors help, but this is my project, so I'm the one doing the coding! When I'm stuck he gives just the tiniest hint and then lets me find my own solutions. Frustrating! But also very good! Because now I can say that I wrote 75% of the code, and I even understand what I wrote image

    And while coding I'm constantly talking to myself, making sure I know what I'm doing.. I seems to help a little bit. It's still very hard!

     

    Linda

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

    Hi Linda,

     

    Good update.

     

    One of the best methods I have found to help pull yourself out of a coding problem is to sit down and try to explain to someone else what the program is supposed to do.  Nine times out of ten, you will get to the part where you are having problems and the bit "eurika" light goes on in your head and you quickly understand what you did wrong.

     

    Even after years of programming, I still get to those Hmm moments.  Then I sit down with my wife or someone else and go through the code and sure enough, dumb error pops right out.

     

    I had one bug that I had shipped with a product and a year latter when I was training the customers software engineer I found it by explaining the software during a training session.  Forcing yourself to go back to the beginning retunes your mind to what you want to do.

     

    Have fun,

    DAB

    • Cancel
    • Vote Up +1 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