I've tried the blink sketch and it works ...yeah!!!!
I then tried tinkering for about three days but can't seem to follow the logic.
The cycle I am trying to build will require the following setup.
Sensing Switch (to activate the sketch) reed switch 1 for motor position forward stop reed switch 2 for motor position reverse stop led out A (optocoupler to drive a H bridge A/B) led out B (optocoupler to drive a H bridge C/D) led out C (optocoupler to drive led cluster) led out D (optocoupler to drive sound circuit)
1 - wait for an input via a switch (if no keep checking)
If yes then do the following
Activate output (led A) - to drive a "H" bridge to drive a motor clockwise Activate output (led C) - to light an led cluster Check motor has driven to stop position (reed switch in 1) if yes Deactivate output A (H bridge FWD) Activate output (led D) - to drive a sound circuit wait 10 seconds Deactivate output (led D) - sound circuit Deactivate output (led C) - led cluster Activate output (led B) - to drive a "H" bridge to drive a motor anti-clockwise Check motor has driven to stop position (reed switch in 2) if yes Deactivate output B (H bridge REV) wait 20 seconds
then go back to checking via sensing switch to start cycle again, whenever sensing switch is triggered.
Really hope someone can help as I am enjoying the arduino nano but really need help with C++
Cheers Guys (and Girls in a political world - sorry)