Arduino Motors not working
when try run motors obstacle avoidance rc car nothing steady "clicking" sound. tried plugging in different motors shield (using motor shield) , same problem occurs.
i used code test;
any ideas?
tyvm
i used code test;
quote
//test 2
void setup() {
//establish motor direction toggle pins
pinmode(12, output); //drive motor -- high = forwards , low = backwards
pinmode(13, output); //turn motor -- high = left , low = right
//establish motor brake pins
pinmode(9, output); //brake (disable) drive motor
pinmode(8, output); //brake (disable) turn motor
//turns brake off drive motor
digitalwrite(9, low);
//turns brake on turn motor
digitalwrite(8, high);
//sets initial speed of drive motor
analogwrite(3, 200);
//sets initial direction of drive motor
digitalwrite(12, high);
}
void loop()
{
//turn off brake turn motor
digitalwrite(9, low);
//set turn motor direction
digitalwrite(12, high);
//activate turn motor
analogwrite(3, 200);
}
any ideas?
tyvm
pin 13 connected resistor , led may giving problems, don't see pinmode pin 3, , actual issue.
Arduino Forum > Using Arduino > Project Guidance > Arduino Motors not working
arduino
Comments
Post a Comment