SUCCESS! Motors are "under control" using direct pin control vs. the libraries, and I now have speed and direction control. I also received a tip on powering the driver board externally from one of our students who has done a lot with Arduino - the "trick" is to use a common ground between the Arduino and driver board! I was hoping that powering the motors with separate, external power would give them enough "oomph" to skid steer, but I think I am working with weak batteries at this point. For the external power I need to wire a switch, otherwise the board is always on (battery terminals are screwed in permanently.)
I have been combining sample code for both motor control and IR sensing, and have now created functions for forward, reverse, halt ("stop" must be it's own command,) left and right. I have buttons on the remote for each function, as well as stop/start and reverse direction.
The IR remote is working well, although the range is short. I wonder if that limitation is the sensor or the remote? I may try my TV remote instead to find out. The IR sensor is also directional, and as I have several I may rig them up in four directions on the chassis. I am quickly nearing the point where I will need to use the breadboard on top of the robot body, as I am running out of pins... I wonder if four IR remotes pinned through the same Arduino input would work? eg. if a signal received by ANY of them would register... and what would happen if TWO received signals?
Even though the skid steering may work, I am thinking that incorporating a servo motor for "true" steering might be a good challenge: I may have to print the steering axle if I can't find good, lightweight materials in my shop.
No comments:
Post a Comment