I have been trying to use the AccelStepper along with PIR sensors to control a series of stepper motors. I'm having a problem figuring out the logic and the code for the project. Here is how it needs to work
PIR detects motion stepper moves from 0 to target positon and back to zero
now multiply that by 7 or so sensors.
At first I was reading the sensor value and when it returned LOW I call a function that runs the motor. However, that didn't work simply because the PIR motion sensor is really sensitive, and combined with AccelStepper, every time the PIR sensor returns LOW the motor moves 1 single step. Which means that it steps and stops continuously based on the PIR sensor. I'm really not sure how to do this but any hints/examples/help are greatly appreciated. The deadline for this project is approaching fast and I still can't seem to figure out this seemingly simple problem.
Thanks in advance