Project: sensor that triggers a stepper motor
I want connect to Arduino a Sensor Sharp Distance Sensor 2Y0A21 (10-80cm)
that functions as a switch on/off to a stepper motor.
The motor start when the sensor detects something and stop after 10", the engine should have an initial acceleration and deceleration final if possible.
I wish it switch off after 5 minutes and restart to operate if the sensor detects something.
I have:
Arduino ONE
Sharp sensor
Big Easy driver
Stepper motor
I'm a beginner and I think it is not simple to do...

someone can help me to get a right sketch?
thanks!