Go Down

Topic: Is this possible to build with arduino (Read 2212 times) previous topic - next topic


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.


also how hard would it be to write the script?


You've pretty-much already written the script.

   wait until button is pressed
   play countdown.
   start overall timer

   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

    Play end sound
    flash all the lights ten times
    got to Start
Send Bitcoin tips to: 1G2qoGwMRXx8az71DVP1E81jShxtbSh5Hp


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

Go Up