Arduino High impact Sensor

Job ID: 33222797

Budget: $10 – $30 USD

Need code written to have the following done.
1. turn on DC motor for predetermined time
2. use Piezo Vibration Sensor to register impact.
a. if impact is registered reverse current of DC motor to return motor to original starting position
b. if no impact registered after predetermined time return motor to original starting position.
3. repeat sequence