Controlling a DC motor's position using a ping sensor. HELP!!!
Mikee
Posts: 1
HElp me please!
I have the sensor mounted on a servo which is mounted separately on the table. The sensor agitates back and forth, and when it notices something the DC motor spins the robot's body, to face the same direction the sensor is facing. Im having trouble with the DC motor, not facing the direction the sensor is facing.
I have coded the ping sensor and it works great. Its attached to breadboard where the DC motor is. I need to make the DC motor turn and face the same position the sensor is facing.
I have this coding for the DC motor but that doesnt make it face the same direction the sensor is facing. PLease Help me!
HIGH 14
PAUSE 380
LOW 13
PAUSE 1000
HIGH 13
PAUSE 380
LOW 13
PAUSE 2000
HIGH 14
PAUSE 380
LOW 14
HIGH 13
PAUSE 350
LOW 13
I have the sensor mounted on a servo which is mounted separately on the table. The sensor agitates back and forth, and when it notices something the DC motor spins the robot's body, to face the same direction the sensor is facing. Im having trouble with the DC motor, not facing the direction the sensor is facing.
I have coded the ping sensor and it works great. Its attached to breadboard where the DC motor is. I need to make the DC motor turn and face the same position the sensor is facing.
I have this coding for the DC motor but that doesnt make it face the same direction the sensor is facing. PLease Help me!
HIGH 14
PAUSE 380
LOW 13
PAUSE 1000
HIGH 13
PAUSE 380
LOW 13
PAUSE 2000
HIGH 14
PAUSE 380
LOW 14
HIGH 13
PAUSE 350
LOW 13
Comments