Hi Robin2,
i cant explain the different boolean variables as this was a basic code i got from an Arudino tutorial page.
What i want to happen is:
-
when powered up, the motion sensor calibrates.
-
When the motion sensor detects motion, it triggers the stepper motor to turn clockwise 200 steps.
-
Once the stepper motor has turned 200 steps CW it should turn 200 steps counter clockwise (thus returning to its starting position)
-
While the stepper is actively rotating there should be a delay in making it rotate again for a certain amount of time, (say 5 seconds).
-
If no motion is detected, the stepper should do nothing.