Pages: [1]   Go Down
Author Topic: Is this possible to build with arduino  (Read 973 times)
0 Members and 1 Guest are viewing this topic.
Offline Offline
Newbie
*
Karma: 0
Posts: 3
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

i am looking to build a hockey shooting trainer. it will controll external realy board .there will be 4 lights, 4 motion sensors, a wav board, a counter, a timer, and a relay board.there will be 4 lights. 1 in each corner of the goal. each light will have a corresponding motion sensor.the 4 lights and 4 .wav files will be controlled by a 8 relay usb card. to start the user will need topush a button. it will begin with a pre recorded countdown .wav recorded on the wav board which can be triggered by 1 of the relays.at the end of the count down there will be a 1 sec pause. 1 of the lights will light up randomly and remian on for 5 sec unless the coresponding motion sensor is triggered. if triggered the light will shut off, the counter will increase by 1 and all 4 lights will flash. after the flash there will be a 1 sec delay and another random light will light with the same scenario. if a light is light and the motion sensor is not tripped, the light will remain on for 5 seconds and shut off. there will be a 1 second delay and the next light will randomly turn on. this will continue untill the timer runs out. the timer will be set for 90 seconds. when the timer runs out all lights will flash ten times and another .wav file will be played from the wav board. i would need a display to dispaly the number of tark=gets hit and to show the countdown 90 second timer. when a button is pushed again it will reset the timer. clear the counter and start all over again.
Logged

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

also how hard would it be to write the script?
Logged

Massachusetts, USA
Offline Offline
Tesla Member
***
Karma: 208
Posts: 8856
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

You've pretty-much already written the script.

Start:
   wait until button is pressed
   play countdown.
   start overall timer

OnePlay:
   if overall timer has reached 90 seconds, go to End
   pause 1 second.
   pick randomly which light to light.
   light the chosen light.
   start the light timer.

   if corresponding motion sensor is triggered:
        turn off light
        increment counter
        flash all four lights
        go to OnePlay

   if the light timer reaches 5 seconds with the motion sensor un-triggered
       turn off light
       go to OnePlay

End:
    Play end sound
    flash all the lights ten times
    got to Start
Logged

Send Bitcoin tips to: 1L3CTDoTgrXNA5WyF77uWqt4gUdye9mezN
Send Litecoin tips to : LVtpaq6JgJAZwvnVq3ftVeHafWkcpmuR1e

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

would anybody be interested in desiging this and write the code for me? let me know a price
Logged

Pages: [1]   Go Up
Jump to: