Pages: [1]   Go Down
Author Topic: Newbie in need of help  (Read 1987 times)
0 Members and 1 Guest are viewing this topic.
Offline Offline
Newbie
*
Karma: 0
Posts: 8
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Hi there, community.
I´m new to the arduino and plan to learn a lot. I´m not sure, wheter this is the right place to post my question (i couldn´t find games&play), and I do know that a lot of people might say: ask google, start learning from the scratch...
I´m willing to do this, but my first "big" project is kind of a quick need. Next sunday we have a big festival and we are building a lot of games for children to play. I found one interesting game that I want to build in a "wooden edition" but with the extension of an arduino and I do need help in programming and connecting (I do know basics). Here is how the game works.
In front of the kid is a hand with 5 fingers (yep, that´s right) in each finger are two rgb-leds or a couple of colored leds. When the game starts, there are two leds on each finger on and the kid has to grab hair-bands and has to put them the right way on it´s own hand. The colors are supposed to be random. For example, the thumbs has 2xleds on, one green, one blue. The kid has to put a green and a blue hair-band on it´s finger. Once all the hair bands are in the correct place, the kid touches the hand and a timer stops, giving out the time needed to fullfil the task. (for I don´t have a display, I´m looking for an alternativ). We have a arduino (uno & mega), a couple of leds. If anyone can help, I would really appreciate.
Thanks, Uli
Logged

Global Moderator
Boston area, metrowest
Offline Offline
Brattain Member
*****
Karma: 439
Posts: 23797
Author of "Arduino for Teens". Available for Design & Build services. Now with Unlimited Eagle board sizes!
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Sounds like variation on Simon game, google that.
Logged

Designing & building electrical circuits for over 25 years. Check out the ATMega1284P based Bobuino and other '328P & '1284P creations & offerings at  www.crossroadsfencing.com/BobuinoRev17.
Arduino for Teens available at Amazon.com.

Copenhagen, Denmark
Offline Offline
Edison Member
*
Karma: 25
Posts: 1143
Have you testrun your INO file today?
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

No I do not see any memory component (isnt that what Simon Says is?)

here is what I have translated the description to Arduino task
On button push a random set of lights turn on. Timer starts.
On other button push timer stops (display...?)

It doesnt matter if the light is an RGB or seperate LEDs. You have 10 LEDs or so - simple direct driving - through a resistor - for each pin will do. The program will only be a handfuld of lines for the lights.

The timer is dead easy: note millis() at start button, subtract from millis() when stop. divide by 1000 and display. The display is your biggest challenge here - if nothing else use a laptop and a terminal emulator showing the serial out with a BIG font.
Logged

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

Msquare is right, this is exactly what we are trying to build.

int finger11 = 13; /* whereas n1 is the upper led */
int finger12 = 12; /* n2 is the lower led */
int finger21 = 11;
int finger22 = 10;
int finger31 = 9;
int finger32 = 8;
int finger41 = 7;
int finger42 = 6;
int finger51 = 5;
int finger52 = 4;
int timer = 3;
void setup() {               
pinMode(led, OUTPUT);   
}
void loop() {
random.color for finger 11 to 52
start.timer
stop.timer when key pressed and display time
start over when key is pressed again
}
Logged

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

In the attachment is an image, on how it is supposed to look like in the end
(sorry forgot one led on the second finger top from the right)


* 3089296-holz-hand-mit-schild.jpg (60.15 KB, 639x1203 - viewed 36 times.)
Logged

Copenhagen, Denmark
Offline Offline
Edison Member
*
Karma: 25
Posts: 1143
Have you testrun your INO file today?
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Msquare is right, this is exactly what we are trying to build.
Happy to help - but what is the question? A programming issue? A wiring issue?

BTW - use the Preview button and the "#" button so you can work out how to show program code in your posts

OK here are some answers. Just like in Jeopardy - what is the question smiley  smiley-mr-green
Code:
pinMode(led, OUTPUT);
should be
Code:
pinMode(finger11, OUTPUT);
pinMode(finger12, OUTPUT);
  // :  and so on
But really you should use an array.

Buttons should be wired between the Arduino pin and Ground. The input pin (and it can be any except 13) is then initialised with
Code:
pinMode(startbutton, INPUT_PULLUP);

Logged

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

Thanks a lot, indeed it´s a programming question, the wiring shouldn´t be a problem
Logged

Pages: [1]   Go Up
Jump to: