Control Arlo with the SimpleIDE Terminal

Control Arlo with the SimpleIDE Terminal

You can also communicate with the Arlo through the SimpleIDE Terminal, and perform the same serial communication tasks the Propeller has been programmed to do.  For example, here is the sequence of commands and replies from Test Encoder Connections example.

In this example, the rst command clears the encoder counts stored by the DHB-10.  Next, gospd 32 32 makes the Arlo move forward at 32 counts per second with each wheel.  Of course, gospd 0 0 stops the wheels, and dist asks how many encoder counts have passed since the last rst command.  Last, but not least, exit takes the program out of command mode and allows the program to continue.

NOTE: For a full list of serial commands you can use, check the DHB-10 Motor Controller Firmware Guide.

  • Make sure your SimpleIDE Terminal’s Echo On box is unchecked.
  • Put the Arlo up on blocks so that its wheels can spin freely without touching your work surface.
  • Set Main, Motors, and Activity Board power to on.
  • Load Arlo Terminal Communication into the Propeller with the Run with Terminal button.
  • Click the text input pane in your SimpleIDE Terminal.  It’s just above the pane that displays Debug messages from the Propeller.
  • Type rst, and then press the Enter Key.
  • Type gospd 32 32, and then press the Enter Key.
  • Wait for a few seconds, then type gospd 0 0, and then press the Enter Key.
  • Type dist, and then press the Enter Key.
  • Verify that the DHB-10’s reply is displayed in the terminal.  Keep in mind that the reply values to your DIST command will depend on how long you let the wheels run.
  Arlo - SimpleIDE Terminal Command Mode.c
  Communicate with Arlo through the SimpleIDE Terminal.

#include "simpletools.h"
#include "arlodrive.h"

int main()
  print("Back in main program.");