Skip to content
Parallax Learn

Parallax Learn

  • Welcome
  • Tutorials
        • Tutorial Series head tag

          Tutorial Series
        • Tutorial Series

          The special, classroom-ready series pages are organized collections of tutorials for our most popular hardware and/or languages. The tutorials for each topic are conveniently accessible from a single page, shown in the order it is recommended that they be completed.
        • Robotics Series Head tag

          Robotics Series
        • Robotics Series

          • Artificial Intelligence
          • Cybersecurity: Radio Data tutorialCybersecurity
          • cyber:bot + Python
          • cyber:bot + MakeCode
          • Boe-Bot Tutorial SeriesBoe-Bot
          • Arduino Shield-Bot
          • ActivityBot with C TutorialsActivityBot + C
          • ActivityBot with BlocklyProp Tutorial SeriesActivityBot + BlocklyProp
          • Scribbler 3 Tutorial SeriesScribbler 3
        • Electronics & Programming Series Head tag

          Electronics & Programming Series
          • BS2 Board of Education Tutorial SeriesBS2 Board of Education
          • Propeller C-Language BasicsPropeller C Basics
          • FLiP Try-It Kit C Tutorial SeriesFLiP Try-It Kit + C
          • FLiP Try-It Kit BlocklyProp TutorialsFLiP Try-It Kit + BlocklyProp
          • Badge WX Tutorial SeriesBadge WX
          • Propeller BlocklyProp Basics and ProjectsPropeller BlocklyProp Basics
          • View All Tutorial Series »
        • Browse Tutorials
        • Browse Tutorials

          Individual tutorials sorted by robot or kit, and language.
        • By Robot or Kit
          • ActivityBot
          • SumoBot WX
          • Boe-Bot
          • Shield-Bot
          • cyber:bot
          • Badge WX
          • ELEV-8
          • ARLO
        • By Language
        • By Language

          • Propeller C
          • Arduino
          • BlocklyProp
          • PBASIC
          • Python
          • MakeCode
          • View All Tutorials »
  • Educators
  • Reference
  • Downloads
  • Home
  • All Courses
  • Arlo with an Activity Board Brain

Arlo with an Activity Board Brain

Try & Tune Some ActivityBot Code

Try & Tune Some ActivityBot Code

Distance Navigation

Let’s try the Forward Stop Face Right program from the learn.parallax.com site’s Go Certain Distances ActivityBot page. 

  • Set power like this: MAIN (on), MOTORS (off), Activity Board (position-2)
  • Use SimpleIDE’s Load EEPROM & Run button to run Forward Stop Face Right.
  • Turn all power off, unplug the programming cable, and take to your Arlo navigation area.
  • Turn MAIN and MOTORS power on.
  • Set the Activity Board power switch to 2.
  • Verify that the Arlo goes forward, stops, and turns slightly to the right.

The program would make an ActivityBot turn about 90° to the right, but not so with the Arlo.  With its different wheel radius, turning radius, and counts per revolution, the number of encoder counts for ¼ turn is no longer a total of 51 counts.  It is now 186, or +93 for the left wheel and -93 for the right wheel.

  • Try changing drive_goto(26, -25) to drive_goto(93, -93), load the modified program into EEPROM, and verify that it makes the Arlo turn 90°. 

In the More Precise Maneuvers with Encoders section, we’ll get those 90° turns on the first try! 

/*
  Forward Stop Face Right.c

  https://learn.parallax.com/activitybot/go-certain-distances
*/

#include "simpletools.h"
//#include "abdrive.h"                        // <- Comment out this line
#include "arlodrive.h"                        // <- Replace it with this line

int main()
{
  drive_goto(256, 256);
  pause(200);
  drive_goto(26, -25);
}

 

Speed Navigation

Another approach introduced in the ActivityBot pages is Navigation by Speed.  As with the previous program, the parameter’s your programs will pass to the drive_speed calls will have to be adjusted to get the desired outcome.  Another thing to keep in mind is that the speeds are not instantaneous.  It takes some time for the Arlo to accelerate into and back out of any given maneuver.

  • Set power like this: MAIN (on), MOTORS (off), Activity Board (position-2)
  • Run Speeds for Navigation.
  • Turn all power off, unplug the programming cable, and take to your Arlo navigation area.
  • Turn MAIN and MOTORS power on.
  • Set the Activity Board power switch to 2.
  • Verify that the Arlo goes forward, stops, and turns slightly to the right, then goes forward again.
/*

  Arlo - Speeds for Navigation.c
 
  Navigate by making your ActivityBot go certain speeds for certain amounts
  of time.

  https://learn.parallax.com/activitybot/set-certain-speeds
*/

#include "simpletools.h"                      // simpletools library

#include "arlodrive.h"                        // <- CHANGE abdrive to arlodrive

int main()                   
{
  drive_speed(64, 64);                       // Forward 64 tps for 2 s
  pause(2000);
  drive_speed(0, 0);

  drive_speed(26, 0);                        // Turn 26 tps for 1 s
  pause(1000);
  drive_speed(0, 0);

  drive_speed(128, 128);                     // Forward 128 tps for 1 s
  pause(1000);
  drive_speed(0, 0);
}

Printer-friendly version
Test Activity Board Arlo’s Encoder Connections
Prev
Control Arlo with the SimpleIDE Terminal
Next

DISCUSSION FORUMS | PARALLAX INC. STORE

About | Terms of Use | Feedback: learn@parallax.com | Copyright©Parallax Inc. 2024

© 2025 Parallax Learn • Built with GeneratePress