Arduino Help

Hi,

Patrick here. I am building a scrum sled training device for CIT Mechanical engineering and hope to use an Arduino MEGA to do the thinking! Basically the idea is simple enough. I want the Processor to start a timing sequence once a start button is pushed.

I want the processor to then activate a voice saying, 'Touch, Pause....Engage' Much like you hear the ref saying in professtional rugby.
Once the word 'engage is said by the processor through a speaker or buzzer, a timing sequence would start, and ending when the player makes contact with the pads on the scrum sled. This conact will bge made by limit switches feediong back into the processor ending the sequence.

Can Anyone help me with the programming!? ANY HELP at all, is very much appreciated.
Thanks again,
Patrick

Welcome to arduino forum!

It's not too hard to do the basic, start a timer after some kind of announcement, then stop it at a button push. You could accomplish this with an arduino UNO. Mega has lots more pins and is not necessary unless you have a ton of sensors (a few dozens of touch pads).

I would suggest you start simple, use an LED to indicate the start, count time until one button is touched. Then you can add multiple buttons (assume multiple contestants) and later add a voice announcement with an MP3 shield. Play with some blinking LED and push button sample codes first and change them to accomplish your basic goal. We typically don't just hand out codes unless you post yours first. :slight_smile:

I am building a scrum sled training device for CIT Mechanical engineering

No idea what a scrum sled is.

and hope to use an Arduino MEGA to do the thinking!

You should do the thinking, and let the Mega do the processing.

I want the Processor to start a timing sequence once a start button is pushed.

OK. The timer (millis()) will already be running. What you want to do is capture the current value when the switch is pressed.
Use digitalRead() to determine the switch state, and using the current state and the previous state, you can determine when the transition to pressed or released occurs (assuming that you wire the switch correctly). Record the time when the appropriate event occurs.

I want the processor to then activate a voice saying, 'Touch, Pause....Engage'

Oooh, that will be hard. The Arduino is not good at audio processing. A wave shield with pre-recorded wav files could be triggered to play a file, though.

Once the word 'engage is said by the processor through a speaker or buzzer, a timing sequence would start, and ending when the player makes contact with the pads on the scrum sled.

So, how does this timing sequence relate to the other timing sequence? Does this timer start at the start of "engage" or at the end? Differences matter.

Is the elapsed time to be kept a secret? You haven't defined what to do with it.

Can Anyone help me with the programming!? ANY HELP at all, is very much appreciated.

Here's a start:

void setup()
{
}

void loop()
{
}

All you need to do now is to include some header files, define some global variables, and add some code to setup() and loop().

Thanks very much for the replies guys, much appreciated. This is a scrum sled :

This video may help explain what im trying to do, fast forward to 0.50secs.

I want the coach to push a button, audio file will then be played..."Touch....Pause......Engage" Once engage is said, a timing sequence is then started, measuring the time for a player to make contact with the scrummage sled, stopping the sequence in turn via limit switch.

The time will then be displayed on a LCD Screen for 15seconds and then deleted. This is the end of the sequence.

PaulS, i hope ive answered your queries as much as possible, im new to this and working under pressure.
Lidur, I understand that, thats fair enough.

Is there anyway someone could write thsi for payment in exchange via paypal or something? is that allowed on this forum? As long as it doent break the bank! $)
Once again, any input is appreciated

You can post on Gigs and Collaborations and offer a monetary compensation. Hope you can find someone local to test out the device with you.

Hi Patrick,
I imagine a card like this to play back the sounds you want, combined with a switch that senses motion when the sled is run into, would suit your needs.
http://www.mdfly.com/index.php?main_page=product_info&products_id=763
With the output fed to a Serial Interface LCD for easy coding
http://www.newhavendisplay.com/index.php?main_page=index&cPath=253&zenid=eb223ce7d7eafc9186b957bb487d5c6e
and then all packaged up in a durable case.

@ CrossRoads, Thanks for that, will look into it now

I just posed on gigs, see what happens, thanks lads