Hi, ive been googling this and trying to put together bits of code from various instructables but just cant get it working.
Its a really simple task; move a stepper motor 1 revolution when distance sensor registers distance <200.
Im using a L293 motor shield
This is what I have so far (im a beginner at this :))
#define ADAFRUIT_MOTORSHIELD_V1 #include <AFMotor.h> #define TRIG_PIN A4 // Pin A4 on the Motor Drive Shield soldered to the ultrasonic sensor #define ECHO_PIN A5 // Pin A5 on the Motor Drive Shield soldered to the ultrasonic sensor
What would the code be for this? Greatly appreciate the help