Increase Arlo’s Top Speed in Pulse Mode
The DHB-10 defaults to a speed control scale from 1000 to 2000 us. That’s writeMicroseconds() duration values from 1000 (full speed clockwise) to 1500 (stop) to 2000 (full speed counterclockwise). The DHB-10 has a scale command for adjusting that range. For example SCALE 200 would make it fit PULSOUT durations from 1300 to 1700. The result, the Arlo goes a lot faster! This also means it’ll travel and turn more for a given number of pulses, so some recalibration may be in order.
- Put the Arlo up on blocks so it cannot run away while connected to the computer.
- MAIN and MOTORS power on, BOE Shield power to 2.
- Upload Change Pulse Scale.ino.
- MOTORS power off.
- Upload ForwardLeftRightBackward.ino.
- MAIN & BOE Shield powers off.
- Take to Arlo navigation area.
- Make sure you’ve got enough room for the Arlo to go more than twice the distance of last time.
- Turn Main, Motors, and BOE Shield powers on.
- Optionally, note the turn angle and recalibrate.
- Optionally, to go back to the slower speeds, uncomment the commented Arlo.writeConfig("SCALE", 1000) command and re-run the ChangePulseScale.ino.
/* Arlo-Change-Pulse-Scale Change pulse scale from 1000...2000 us to 1300 to 1700 us so that Robotics with the BOE Shield-Bot examples can run the Arlo at top speed. */ #include <ArloRobot.h> // Include Arlo library #include <SoftwareSerial.h> // Include SoftwareSerial library // Arlo and serial objects required ArloRobot Arlo; // Arlo object SoftwareSerial ArloSerial(12, 13); // Serial in I/O 12, out I/O 13 void setup() // Setup function { tone(4, 3000, 2000); // Piezospeaker beep Serial.begin(9600); // Start terminal serial port ArloSerial.begin(19200); // Start DHB-10 serial com Arlo.begin(ArloSerial); // Pass to Arlo object Arlo.writeConfig("SCALE", 200); // Change pulse to speed response //Arlo.writeConfig("SCALE", 1000); // Want default back? Un-comment Arlo.storeConfig("SCALE"); // Save setting in EEPROM Arlo.writePulseMode(); // Get ready to receive pulses } void loop() {} // Nothing for main loop