Test BOE Arlo Motor Connections

Test Motor Connections

This next program sets the Arlo’s motors to 20/127 of full power in the forward direction.  If your Arlo goes forward while running this program, it indicates that your motors are connected correctly and the battery is charged.

IMPORTANT: Your Arlo will not be ready for the next step until it goes forward for this test.

  • Check the picture at the start of this document and make sure you know the Arlo’s forward, backward, left and right.
  • Turn off the Arlo’s Motors power switch.
  • Run Arlo - Test Motor Connections.bs2.
  • The Debug Terminal will display a communication failure because your DHB-10 isn’t responding.  Don’t worry about it, the DHB-10 didn’t reply because Motors power is off.
  • Turn all power switches off.
  • Take your Arlo to an open space with at least 2 m of open space for forward travel.
  • Turn all powers on: Arlo MAIN & MOTORS and BOE power to 2.
  • Verify that the Arlo goes slowly forward for 3 s, then stops.
    • If it does not go forward, check the Arlo Fails Motor Connections Test section in the Troubleshooting Guide at the end of this document.
    • If it does go forward, your Arlo is ready for the next step (Test Encoder Connections).
' Arlo - Test Motor Connections.bs2
' Run this program to verify that your Arlo goes forward.

' {$STAMP BS2}
' {$PBASIC 2.5}

s VAR Byte(19)                                ' Stores DHB-10 replies
n VAR Byte                                    ' Stores index of serial exchange

FREQOUT 4, 2000, 3000                         ' Beep -> program starting
DEBUG "Program running...", CR, CR            ' Display program running

n = 1                                         ' First exchange
DEBUG "GO 20 20", CR                          ' Display message to DHB-10
SEROUT 13, 32800, ["GO 20 20", CR]            ' Motors forward 20/127 of full power
SERIN  13, 32800, 50, ERR, [WAIT(CR)]         ' Wait for DHB-10 confirmation

PAUSE 3000                                    ' Let motors run 3 seconds

n = 2                                         ' Second exchange
DEBUG "GO 0 0", CR                            ' Display message to DHB-10
SEROUT 13, 32800, ["GO 0 0", CR]              ' Set both motors to 0 power
SERIN  13, 32800, 50, ERR, [WAIT(CR)]         ' Wait for DHB-10 confirmation

END                                           ' End program

ERR:                                          ' Error routine
 DEBUG "ERROR, no reply from DHB-10.", CR    ' Error message
 DEBUG "n = ", DEC n                         ' Index of exchange that failed
 STOP                                        ' End program