My remote-controlled robot was not behaving the way I expected off the bat. Telling it to move forward made the robot move backwards (I assumed that the side of the robot that the wheels were attached to was the front of the robot). It was also moving left when I wanted it to move right. To fix the issue with turning I simply switched the wiring of the motor so that the motor connected to B0, B1 was moved to A0, A1 and vice versa. To fix the forward and reverse problem I rearranged the else if code so that botDirection == "f" set both motors to -200, and botDirection == "b" set both motors to +200. In hindsight I could have just switched the red and black wires on the motors themselves though. I also had an issue where one wheel seemed to spin slower then the other when driving forward or backward so that the robot would start turning instead of driving in a straight line. Since this was inconsistent, I'm thinking that this was due to the wheels slipping on the hard flooring and not that one motor was slightly faster then the other.
The Landing is a social site for Athabasca University staff, students and invited guests. It is a space where they can share, communicate and connect with anyone or everyone.
Unless you are logged in, you will only be able to see the fraction of posts on the site that have been made public. Right now you are not logged in.
If you have an Athabasca University login ID, use your standard username and password to access this site.
We welcome comments on public posts from members of the public. Please note, however, that all comments made on public posts must be moderated by their owners before they become visible on the site. The owner of the post (and no one else) has to do that.
If you want the full range of features and you have a login ID, log in using the links at the top of the page or at https://landing.athabascau.ca/login (logins are secure and encrypted)
Posts made here are the responsibility of their owners and may not reflect the views of Athabasca University.