I have Arduino 1.6.5 . I ran an example program 'Motor test' within 'Robot Control' . using arduino UNO board with a L293D motor shield. Somehow when I verify the program, it gives a lot of errors. What can be the solution for this? If possible can anyone please give me the verified one?
You selected 'Arduino Robot Control' as the board type now didn't you?
If you want help you need to post your code and post the errors you are getting.
And please use the code button </> so your code looks like this
and is easy to copy to a text editor
...R
#include <ArduinoRobot.h>
#include <Wire.h>
#include <SPI.h>
void setup() {
// initialize the robot
Robot.begin();
}
void loop() {
Robot.motorsWrite(255, 255); // move forward
delay(2000);
Robot.motorsStop(); // fast stop
delay(1000);
Robot.motorsWrite(-255, -255); // backward
delay(1000);
Robot.motorsWrite(0, 0); // slow stop
delay(1000);
Robot.motorsWrite(-255, 255); // turn left
delay(2000);
Robot.motorsStop(); // fast stop
delay(1000);
Robot.motorsWrite(255, -255); // turn right
delay(2000);
Robot.motorsStop(); // fast stop
delay(1000);
}
So which board should I select? Because I am operating using Arduino UNO
That code works only with the Arduino Robot Control board, as far as I can see.
When I selected Robot Control Motor, it got verified and then when I was uploading it to my UNO on which the motor shield is connected, it was not getting uploaded. Any idea how to fix that?
Moderator: Cross-post deleted
Its example code for the Arduino Robot board only, that's why its in the Robot Control section of examples.
Shaurya302000:
it was not getting uploaded.
Presumably, although you do not say what went wrong at the upload, it said avrdude: Yikes! Invalid device signature or something to that effect. You have to select the actual board you are using, not the one you would like it to be.
Shaurya302000:
Any idea how to fix that?
The library you specify (that is the 1st line in your example) has to match the addon board you are using. If you are not using the Arduino robot stuff, then use the right motorshield library.