There is not any speed sensors on the bot, but you could make 'encoders' on the axles and adjust the motors that is faster and slow it down by a count or two. Or speed up the one that is slower. If you always run the motors at the same speed, you can remember the last calculated speed and only update it when you see an error.
You can find shaft encoders out on the internet or make your own. Because the easy place to put one is on the axle, I would use one that counts several counts per revolution rather than one count per revolution like you could use on the motor shafts themselves. If you want to make your own I would put a gear or wheel on the axle between the gearbox and the wheel. Have holes or large teeth that can be detected on the wheel/gear. Commonly used are IR Emitter/Detector pair devices that are interrupted by the wheel or reflect off the teeth and not the gap between the teeth.
You could also try using a Hall Effect (magnetic sensor) directly on the motor and sense the field change. I have a bag of the Hall Effect Sensor and think I will see what I get trying a pair of them.
The other problem with 'Navigating' is you may have poor traction and even when you get the wheels spinning the same speed, you still may not go straight. I built the Ardi-Bot with the group and also just got a larger platform that has shaft encoders slotted wheels on the gearbox. I have not put any sensors on it yet or written any code. This weeks project.
I did add a Bluetooth adapter and used the SoftSerial library and an App I found on the Android Marketplace to control the Ardi-Bot. The app is free and called 'Bluetooth SPP'. It has a mode where you can program 9 buttons and when you click on one they send out a string. I have Forward, Backward, Right, Left, Spin Right, Spin Left, Stop,
+ (Increase Speed) ,
- (Decrease Speed). I went to Chino Hills Electronics Swap today and it was a hit. I also added an Ultrasonic Distance Ranger to the front of it and programmed it to stop when it came within 8" of anything, it also restarted when the object moved away.
/* Commercial:
Things I sell:
- IR Reflective Sensors (and included two in the Arduino Kits I sold at the meetings).
- Hall Effect Sensor. There are three pin devices that 'turn on and off' based on if they see a magnetic field.
- Ultrasonic Ranger. These have a Arduino Library and can sense from 1-900 CM distance.
- Bluetooth Module. Connects to a Bluetooth Smartphone or Computer and acts like a serial port, wirelessly. At the swap we went over 50'.
I will bring a bunch of each to the next meetings and have special pricing that is better than I have on my web site. If anyone wants them sooner, you can order on the website and select 'Store Pickup', adding a note that you are club member and I will email you with club pricing and discounted shipping, then if you want the parts I will invoice you by PayPal. My store is at
http://hacker.instanet.net/Store/
I also have put a of of new articles on the website using these parts and more in the forums at
http://hacker.instanet.net/forums/. Check under 'Arduino' and 'Hacker's Warehouse Feedback'
Remember also that I donate 5% of the gross sales to the club.