Go Down

Topic: controlling several LED's with one button (Read 938 times) previous topic - next topic

nickarduino

hello,
I am currently trying to make a scoreboard for a game that i bought. the scoreboard needs 14 led's to be powered sepretly so when i get a point i press the button and one led lights up all the way up threw 9 and then it lights up an led underneath that's says 10 and so on. there will only be one button on the board, what should my code be.

thanks,
nick

marco_c

What have you got so far?
What is your circuit?
Arduino libraries http://arduinocode.codeplex.com
Parola for Arduino http://parola.codeplex.com

fungus

Only one button?

In that case:

How will you reset the score for each game?

How will you correct a mistake if you press the button accidentally?

No, I don't answer questions sent in private messages (but I do accept thank-you notes...)

MrMr


Only one button?

In that case:

How will you reset the score for each game?

How will you correct a mistake if you press the button accidentally?




Press and hold x seconds = reset
Press manualy the game score again.
And so on..

Lots of opportunties with just one button. 

fungus


Press and hold x seconds = reset
Press manualy the game score again.
And so on..

Lots of opportunties with just one button. 


Sure...but you come in here and say "what should my code be?" then suddenly start changing the specifications? The people here aren't machines who'll write and rewrite code for you, they have lives of their own.

PS: That's a horrible user interface. Is there any reason why you can only have one button?
No, I don't answer questions sent in private messages (but I do accept thank-you notes...)

MrMr



Press and hold x seconds = reset
Press manualy the game score again.
And so on..

Lots of opportunties with just one button. 


Sure...but you come in here and say "what should my code be?" then suddenly start changing the specifications? The people here aren't machines who'll write and rewrite code for you, they have lives of their own.

PS: That's a horrible user interface. Is there any reason why you can only have one button?



Its not me who wrote the topic. I just answered that it could be done with one button. I agree with the other aspects you said.

fungus


Its not me who wrote the topic. I just answered that it could be done with one button. I agree with the other aspects you said.


My bad.

The point stands though, I think the design needs work before starting to write any code.
No, I don't answer questions sent in private messages (but I do accept thank-you notes...)

MrMr



Its not me who wrote the topic. I just answered that it could be done with one button. I agree with the other aspects you said.


My bad.

The point stands though, I think the design needs work before starting to write any code.



I agree on that  :)

mixania

#8
Mar 18, 2013, 02:42 pm Last Edit: Mar 18, 2013, 03:19 pm by mixania Reason: 1
First of all, You could control numbers more easily using a 7 segment display. So instead of configuring 10 LEDS, just use one of these displays and save some time.
https://www.sparkfun.com/products/8546

Consider some debouncing code for the buttons too. Read about it more in the links:
http://arduino.cc/en/Tutorial/Debounce

This is a very neat debounce tutorial:
http://www.ladyada.net/learn/arduino/lesson5.html

Arduino Uno R3
Mac OSX Lion

fungus


First of all, You could control numbers more easily using a 7 segment display. So instead of configuring 10 LEDS, just use one of these displays and save some time.


He might be making a cribbage score board, so 7-segment LEDs don't work. :)

He seems to have gone away though.
No, I don't answer questions sent in private messages (but I do accept thank-you notes...)

Go Up