Pages: [1]   Go Down
Author Topic: controlling several LED's with one button  (Read 786 times)
0 Members and 1 Guest are viewing this topic.
Offline Offline
Newbie
*
Karma: 0
Posts: 1
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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
Logged

Sydney, Australia
Offline Offline
Edison Member
*
Karma: 27
Posts: 1184
Big things come in large packages
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

What have you got so far?
What is your circuit?
Logged

Arduino libraries http://arduinocode.codeplex.com
Parola hardware & library http://parola.codeplex.com

Valencia, Spain
Offline Offline
Faraday Member
**
Karma: 118
Posts: 4554
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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?

Logged

No, I don't answer questions sent in private messages...

Offline Offline
Newbie
*
Karma: 0
Posts: 18
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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. 
Logged

Valencia, Spain
Offline Offline
Faraday Member
**
Karma: 118
Posts: 4554
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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?
Logged

No, I don't answer questions sent in private messages...

Offline Offline
Newbie
*
Karma: 0
Posts: 18
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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.
Logged

Valencia, Spain
Offline Offline
Faraday Member
**
Karma: 118
Posts: 4554
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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.
Logged

No, I don't answer questions sent in private messages...

Offline Offline
Newbie
*
Karma: 0
Posts: 18
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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  smiley
Logged

Westbrook, CT
Offline Offline
Full Member
***
Karma: 2
Posts: 139
"Why should I bother with made-up games when there are so many real ones going on." (c) Kurt Vonnegut
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

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

« Last Edit: March 18, 2013, 09:19:51 am by mixania » Logged

Arduino Uno R3
Mac OSX Lion


Valencia, Spain
Offline Offline
Faraday Member
**
Karma: 118
Posts: 4554
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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. smiley

He seems to have gone away though.
Logged

No, I don't answer questions sent in private messages...

Pages: [1]   Go Up
Jump to: