Hi all, I need help in getting going here with the beginning stages of getting the BOE shield with arduino coding for the wheel movement, I believe the code is right side test. I have noticed through the sketches used is #include <servo.h>. Now that I Have done most of beginning test successful until the sketches have delay() included, now the problems start.
The sketch below explains what should happen, but only does turn servo cw and still, does not follow through the code of below. What is missing?
/*
-
Robotics with the BOE Shield - RightServoTest
-
Right servo turns clockwise three seconds, stops 1 second, then
-
counterclockwise three seconds.
*/
#include <Servo.h> // Include servo library
Servo servoRight; // Declare right servo
void setup() // Built in initialization block
{
servoRight.attach(12); // Attach right signal to P12
servoRight.writeMicroseconds(1300); // Right wheel clockwise
delay(3000); // …for 3 seconds
servoRight.writeMicroseconds(1500); // Stay still
delay(1000); // …for 3 seconds
servoRight.writeMicroseconds(1700); // Right wheel counterclockwise
delay(3000); // …for 3 seconds
servoRight.writeMicroseconds(1500); // Stay still
//…for 3 seconds
}
void loop() // Main loop auto-repeats
{ // Empty, nothing needs repeating
}