lightview

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

here is what I have translated the description to Arduino taskOn 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.

I fixed it. You were missing a bunch of "}" The first error message you had was due to the loop() started before a "}" closed the previous void setup() .

Notice that the code here is in a nice seperate box, which makes reading it easier. Also note the indentation - the editor does it if you press ^T. Read the top post on how to post to get these details right.

I do not know if this is the logic you want. The code you supplied had some "}" inside comments (after a "//" on the same line) and thus do not count. I have just sprinkled "}" at the end until it compiled.