Altering the "Chameleon Scarf" code

Wearable electronics: boards, conductive materials, and projects from Adafruit!

Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.
Locked
User avatar
TwilightOwl
 
Posts: 2
Joined: Fri Apr 17, 2015 11:42 am

Altering the "Chameleon Scarf" code

Post by TwilightOwl »

Hello, I am working on a project similar in function to the "Chameleon Scarf" except that I need mine to be able to sample color at regular intervals without restarting the FLORA. How should I change the code to allow that?

User avatar
Franklin97355
 
Posts: 23910
Joined: Mon Apr 21, 2008 2:33 pm

Re: Altering the "Chameleon Scarf" code

Post by Franklin97355 »

You would move the sampling code from the setup() function to the loop() function and add a delay or better yet check millis() to update every so often.

User avatar
TwilightOwl
 
Posts: 2
Joined: Fri Apr 17, 2015 11:42 am

Re: Altering the "Chameleon Scarf" code

Post by TwilightOwl »

Thank you, that worked!

Locked
Please be positive and constructive with your questions and comments.

Return to “Wearables”