Boe Shield-Bot Left Servo problem
hungryTechie
Posts: 14
Hi there,
I work on the Robotics with the Board of Education Shield for Arduino and follow the pdf tutorials posted on the website. Everything works fine but there's a small problem with the left servo and I notice the problem happens on two occasions:
1. whenever I click the upload button from the Arduino software, the left servo moves the bot slightly to the right BEFORE performing the code written for the bot
2. the same slight turn happens when I click the RESET button on the shield; after that the code is run and the robot follows the code well
Any suggestions on how to fix this annoying problem with the left servo?
Not sure if this helps but to center the left servo I used the software with the following code:
servoLeft.writeMicroseconds(1490);
Thank you
I work on the Robotics with the Board of Education Shield for Arduino and follow the pdf tutorials posted on the website. Everything works fine but there's a small problem with the left servo and I notice the problem happens on two occasions:
1. whenever I click the upload button from the Arduino software, the left servo moves the bot slightly to the right BEFORE performing the code written for the bot
2. the same slight turn happens when I click the RESET button on the shield; after that the code is run and the robot follows the code well
Any suggestions on how to fix this annoying problem with the left servo?
Not sure if this helps but to center the left servo I used the software with the following code:
servoLeft.writeMicroseconds(1490);
Thank you
Comments
Did you center your servos using the Potentiometer built into their base?
Check your batteries also since servos use a lot of current.
This is actually an artifact from the way the Arduino behaves on start-up; it toggles that pin. In most applications where you are navigating with sensors, the small twitch does not affect performance at all, since the program's sensor input states take over right away.
Notice that the example programs start with a 3-second beep. If you have a situation where you want the robot to drive straight forward from its starting position, put the 3-position switch (0-1-2) in Position 1, and then hit Reset. When you hear the beep, slide the switch to position 2. When the switch is in Position 1, power goes to the breadboard connections but not the servo headers, so the Arduino reset cannot make the left servo twitch.
You can also keep the 3-position switch in Position 1 for programming, and of course you would not see the servo twitch. This is recommended, to keep the robot from rolling off the table while you are programming it!
I hope this helps!
I was wondering if this is something that happens only to my Boe Bot or is it a sort of default behavior, as Steph suggests. It seems a sort of a minor but annoying bug.
If you want to use different I/O pins for the servo connections you may, but that would require modifying the code for all of the example programs. Your choice.
your initial suggestion works. Using different I/O pins for the servo connections is something I will consider for the future.
Do you know where I should click to mark this as resolved?
You'll see a drop down menu, and from it you can select it to show "Solved" instead of "Unsolved".
PIN 13 is used by the bootloader on Arduino's that flashes the LED on boot
This is not an artifact, it is by design. Very few people use PIN 13, unless they have to.
Then it's a matter of working around it.
If you are so deep into it that you must use PIN 13, you will know how to work around it.
My only question is, why did parallax dev a board based around using PIN 13 when there was zero reason to do so?
There are several ways around it, but the easiest way is to not use the header on the "Board of Education Shield" for PIN 13
In most everything you will do with the any Arduino, you will probably never have to use PIN 13. The use case is rare at best.
Use a 3 pin header on the breadboard
Hook GND = Black , Red = 5V , White = PIN 10 or other pin that is not pulled High at bootup
You will have to change servoLeft.attach(13); to servoLeft.attach(10);
or wherever PIN 13 is called on
This will resolve this issue.
And then don't use PIN 13 in future projects.