Skip to content
  • Home
  • Account
  • Restricted content
  • OBEX
  • Chips Tips
  • Logout
  • Shop
  • QuickBytes
Propeller OBEX
  • OBEX
  • Forum
Login
Propeller OBEX

Propeller 2

  • Configuring Visual Studio Code for Programming the P2 on Mac, Windows, and Linux
  • Breakout Board Options for P2 Edge Modules
  • Solar Panel Monitoring Demo (Intro to Using Video 3 of 3)
  • Wireless Programming with the ESP8266 WX Module
  • Brushless DC Motor Control Demo
  • Colorful Terminal Output with ANSI Escape Sequences
  • XBee RF Transparent and API Mode Demo
  • DS3231 Real Time Clock I2C Demo
  • Multiple Servo Control (up to 64) Object
  • Multiple Serial Port (8 UART – 16 Tx/Rx) Object
  • Goertzel Operation with Ultrasonic Transducers
  • Web Page Control of WS2811 LEDs Using the IoT Gateway on Raspberry Pi
  • 320×240 LCD Driver for ILI9341 Controller and XPT2046 Touch Screen
  • Digital Sample ADC to DAC + Analog Frequency to DAC
  • Using Smart Pins to Measure Frequency Output of TSL235R Light-to-Frequency Sensor
  • Ping))) Ultrasonic Distance Sensor with Graphical Debug Demo
  • Simple Analog Input
  • P2 Edge 16 MB Flash Reader and Explorer Utility
  • LED Matrix used as an I/O Test Utility
  • Arlo Conversion to P2 with the Universal Motor Controller
  • Five Buttons On One Pin
  • P2 RTC Add-on Board Demo
  • Simple Video Driver – Using Images (Intro to Using Video 2 of 3)
  • Starting Your P2 Project with a Spin2 Template
  • E-Ink Display Demo
  • MAX7219 LED Display SPI Demo
  • DHT11, DHT22, CM2302 Humidity and Temperature Sensor Object
  • NMEA GPS String Parsing
  • Floating Point Math: DEBUG and Terminal Display Example
  • LEDs – Beyond the Basics
  • Quadrature Encoder Object
  • P2 RTC Add-on with GPS Module
  • DVI/VGA Text Driver Demo
  • PCF8574 I2C LCD Demo
  • Simple Sound Engine Demo
  • 1-Wire Driver with DS18B20 Temperature Sensor Demo
  • Send Email from the Propeller 2 Using the IoT Gateway on Raspberry Pi
  • I2C Device Bus Scanner Utility
  • 32-Channel ADC Object
  • Tetris
  • Video Hardware with Character Map Demo (Intro to Using Video 1 of 3)
  • WS2811, WS2812, WS2812b, WS2813, SK6812x NeoPixel Object
View Categories
  • Home
  • Docs
  • Quick Bytes
  • Propeller 2
  • Arlo Conversion to P2 with the Universal Motor Controller

Arlo Conversion to P2 with the Universal Motor Controller

Reading Time: 6 min read

Description #

These instructions demonstrate the upgrade of an Arlo robot from Propeller 1 to Propeller 2 control with the new Parallax Universal Motor Controller Add-on #64010.

The operation and example code are demonstrated in the included video. The example code features the basic instructions required to drive the Arlo robot, and has been designed to operate via a terminal connection, either with a PropPlug cabled USB connection or wirelessly with the Parallax WiFi module.

The code demonstrates the use of a non-blocking human interface, such that you can issue multiple instructions without waiting for the first instructions to complete. For example, the non-blocking interface allows the user to interrupt a drive command with a stop command. This might be very important to prevent a robot collision!

The SPIN2 source code archive is included.

This project aims to provide a starting point for user code and demonstrates the basic principles of robot control and communication. Join us at P2 Live Forum to ask questions or share your robot design! You can always post your ideas and questions at our forums too! https://forums.parallax.com.

Connections

  • Plug WX SIP Module into the WX Adapter. Observe the orientation markings on the WX Adapter- the white bump matches the metal can bump on the WiFi module.
  • P2 Edge Module Breadboard
    • Recommend to set the “ACC VOUT” header 5V jumper to OFF position.
    • Plug P2 Edge Module into the socket
      Plug WX Adapter with WiFi module into IO pin header P56-P63
    • Plug 64010 Universal Motor Driver into IO pin header P0-P15 and P16-P23
    • Plug four encoder cables (two from each motor) into IO pin headers as follows:
      • Left wheel A encoder, Black pin to GND pin, White pin to IO pin 26
      • Left wheel B encoder, Black pin to GND pin, White pin to IO pin 27
      • Right wheel A encoder, Black pin to GND pin, White pin to IO pin 18
      • Right wheel B encoder, Black pin to GND pin, White pin to IO pin 19
    • Connect 5V power from Arlo 5V output terminal to the Breadboard DC Barrel Jack.
  • 64010 Universal Motor Driver Add-on
    • Left Motor Blue Cable to U channel spring terminal connector
    • Left Motor Red Cable to V channel spring terminal connector
    • Right Motor Blue Cable to W channel spring terminal connector
    • Right Motor Red Cable to X channel spring terminal connector
    • Arlo Motor output positive terminal to VIN spring terminal connector
    • Arlo Motor output negative/GND terminal to GND spring terminal connector

Steps

  1. Attach the P2 Edge with Universal Motor Controller to your Arlo robot, or your own custom robot. Follow the photos, connections and video for guidance.
  2. Download the zip code archive file and unzip it.
  3. Open PropellerTool on your computer, and load the example code file extracted from the zip: 64010_Universal_Motor_Driver_Demo_MMWK.spin2
  4. Ensure your robot is powered on, and the WiFi module is connected to the same network as your computer or laptop. (For help with setting up WiFi refer to this guide :
  5. In Propeller Tool, verify that the two IO pin “con” sections near the start of the code have the same IO pin settings as your robot. The example code has them set to the same positions as shown in the Photos and Video, but you can change them as required.
    1. In the code section “con { encoder io pins }”, set the IO pins to match the encoder cables coming from your motors. If you do not have encoders then set all the Encoder pins to -1.
    2. In the code section “con { motor io pins }”, set the BASEPIN value to match the lowest IO pin number of the headers your Universal Motor Driver is plugged into.
  6. Save the code with your changes (CTRL + S), and then press F8 to generate a binary file. A window will appear- at the bottom click the “Save as binary” button, choose the folder that you unzipped the code archive into (where you saved 64010_Universal_Motor_Driver_Demo_MMWK.spin2), choose a filename to save the binary (recommended: 64010_Universal_Motor_Driver_Demo_MMWK.binary) and confirm.
  7. Now you have created the code binary file, the next step is to program and control your robot!
  8. Open a command prompt (Press the windows key on your keyboard, type “cmd”, press ), then follow these steps:
    1. Navigate to the folder where you unzipped the code archive (and saved the binary).
    2. Type (or copy/paste) this proploader command into the command prompt window and press :
      proploader -T -D chipver=P2 -D reset=cts -r
    3. 64010_Universal_Motor_Driver_Demo_MMWK.binary
      After some moments you should see a message “Download Successful”. Press to start communications with your robot, then refer to the API section to control your robot.
    4. If you have a pop-up request from Windows asking to confirm firewall access then press OK and if necessary try the proploader command again. You might be asked for permission the first time you open the connection to your robot.

API

Command

Parameter Options

Description

ECHO

No Parameter

ON

OFF

Toggle command echo on or off (On by default)

Set command echo on

Set command echo off

STOP

No Parameter

Immediately abort previous command and stop the motors

GOLEFT

 speed

speed can be -1000 to 1000.

Negative is reverse rotation, Positive is forward rotation, 1000 is fastest, 0 is stop.

Note that depending on the size and load of a DC motor, a minimal amount of speed will be required to turn them. Example- At moderate load the Arlo motors will start turning when speed is greater than 200. (or -200 in reverse).

GORIGHT

 speed 

GO

No Parameter
left-speed  right-speed

Repeat previous GO command

Set both the GOLEFT and GORIGHT speeds and drive the wheels together

Examples:

GO 300 300  (drive forward)

GO -300 -300 (drive backwards)

GO 300 -300 (spin the robot!)

DRIVE

left-speed  right-speed
left-speed  right-speed

Set multiple pairs of left and right speed settings. Important to also set the TIME or TICK greater than 0!

Robot will execute each pair of values until the TIME or TICK limit expires for each move, looping through the entire DRIVE string.

Tip: Pre-prepare a DRIVE statement in notepad to perform a driving manoeuvre, then paste it into the command window.

TIME

 time in milliseconds movement limit

0-5000, 0 is OFF

This is the movement time limit for each command. After which the robot will stop and be ready to process the next command.

If set to 0 the robot will ignore the time and may move indefinitely, until a new command is issued, such as STOP.

TICK

 tick count movement limit

0-360, 0 is OFF

This is the movement encoder ticks limit for each command. After which the robot will stop and be ready to process the next command.

If set to 0 the robot will ignore the encoder ticks and may move indefinitely, until a new command is issued, such as STOP.

RAMP

 ramp up / down rate

0-100, 0 is OFF

This is the ramp up and down rate for the motors, to prevent sudden power surges and mechanical stresses.

0 disables the ramp feature. Otherwise the speed setting is divided into ramp steps and each step pauses for 10milliseconds. Such that a ramp rate of 100 represents a 1 second ramp-up and ramp-down time.

Note that the ramp time is included in the “TIME” calculation. If ramp up and down are each 1 second, you will observe that total drive “TIME” is reduced by that amount and therefore drive distance will also be impacted.

HELP

No Parameter

Display a list of commands

Command Delimiter

Where multiple parameters are used, either a SPACE or COMMA can be used as the delimiter between the command and first parameter, and also between subsequent parameters.

Command Hints

For TIME, TICK and RAMP commands, if you enter the command without parameters it will reply with the currently stored value. In the case of the GO command, it will execute the command using the previously stored speed values.

Notes about Parts Used

  • Power Cable to the P2 Edge Module Breadboard. I used a DC Barrel Jack pigtail cable (2.1mm x 5.5mm) from the Arlo Power Distribution Board 5V output to the P2 Edge Module Breadboard. You might already have such a cable powering the old Propeller 1 Board on the Arlo. Here is an example of the item from Amazon
  • The PlugPlug could be used to program and operate the robot via USB, instead of over the wireless connection. In that case, program your P2 Edge module in the usual way (Typically F10 in Propeller Tool), and then press F12 in PropellerTool to open a terminal window and hit enter to start communication with the robot.
Parts Used #
  • Arlo Complete Robot System (#28996)
  • P2 Edge Breadboard (#64020)
  • P2-EC Module (#P2-EC)
  • Universal Motor Driver P2 Add-on Board (#64010)
  • Parallax WX ESP8266 WiFi Module - SIP (#32420S)
  • P2 WX Adapter Add-on Board (#64007)
  • Prop Plug (#32201)
Source Code #
  • Universal Motor Driver Demo Code Archive
Programming Language #
  • Spin 2
  • PASM2
Tools and Operating System #
  • Propeller Tool for Windows
Additional Resources #
  • Propeller 2 Spin Documentation
Propeller 2 Live Forum Video: BLDC Motor Driver Low-Level
Document Author #
  • Michael Mulholland
Source Code Author #
  • Michael Mulholland
Was this useful ?

Share This Article :

  • Facebook
  • X
  • LinkedIn
Still stuck? How can we help?

Still stuck? How can we help?

Updated on September 29, 2026
LED Matrix used as an I/O Test UtilityFive Buttons On One Pin
Table of Contents
  • Description
  • Parts Used
  • Source Code
  • Programming Language
  • Tools and Operating System
  • Additional Resources
  • Document Author
  • Source Code Author

Copyright © 2026 - Parallax Inc.
599 Menlo Drive | Rocklin, CA 95765 | USA