Go Down

Topic: help with LED Button sketch (Read 787 times) previous topic - next topic

ok well right now im still bouncing around ideas so i dont have any code written but i want to write up a sketch that will enable me to switch between different modes. in one mode i will be able to press a button and have an LED light up the button with a certain color. in another mode i want to be able to make the LED change colors so that the button seems to be changing colors. i want to be able to hold down a button or two for a certain amount of time so that the arduino knows that i want to switch modes but i dont know how i would write that. any help?

GregaG

You could use PulseIn command.
http://arduino.cc/en/Reference/PulseIn

Or multiple If sentences.
As far as LED goes use an RBG LED.

AWOL

Start at the beginning; look at some of the examples of how to fade a single LED.
Look at how to accept button presses, then merge.
"Pete, it's a fool looks for logic in the chambers of the human heart." Ulysses Everett McGill.
Do not send technical questions via personal messaging - they will be ignored.

I know all of these basic things already but what i want to be able to do is just change the mode at any given time and not just at start up so how would i loop that?

AWOL

Quote
but what i want to be able to do is just change the mode at any given time and not just at start up so how would i loop that


You would put your code in "loop".

Why don't you show us your code, and we can help you from there.
"Pete, it's a fool looks for logic in the chambers of the human heart." Ulysses Everett McGill.
Do not send technical questions via personal messaging - they will be ignored.

Go Up
 


Please enter a valid email to subscribe

Confirm your email address

We need to confirm your email address.
To complete the subscription, please click the link in the email we just sent you.

Thank you for subscribing!

Arduino
via Egeo 16
Torino, 10131
Italy