Mini-Rosco Spring 2020

Mini-Rosco ArxRobot Application Customization 

Author: Alex Margaris

Table of Contents

Introduction

The main purpose of this blog post is to demonstrate how to effectively create custom commands and customize the ArxRobot application. This blog post will cover the basics of setting up the ArxRobot application and discuss how to implement custom commands through the Arduino IDE. It should be noted that Arxterra.com already has extensive information on this, however, this blog post will be geared towards Mini-Rosco and go into depth on the function and reasoning behind Mini-Rosco’s generation 1 commands.

First this blog post will discuss how to create custom commands and configure the ArxRobot application.

Then it will discuss how Mini-Rosco implemented this and the creation of the Mini-Rosco custom commands from an application perspective.

Finally, this blog post will also discuss how to develop custom commands through the Arduino IDE and how Mini-Rosco created its custom commands.

Conveniently, the ArxRobot application has been designed such that a 3DoT board does not need to be connected in order create custom variables within the application. This means that the only three materials needed to do complete this process is to obtain a cellphone with the ArxRobot application downloaded, and a computer with the Arduino IDE downloaded. This means that the first menu that appears when the application is opened can be disregarded for this step and only used when a 3DoT is needed for testing and implementation purposes. For more information on this please visit this Arxterra Tutorial.

Creating Custom Commands through the ArxRobot application

To begin, first open the application and ensure that developer mode is “ON” as shown in step (1) in figure 1. Then proceed to click on the ‘gear’ icon shown in step (2) in figure 1.

Figure 1: Application Opening Screen

Once the previous step has been completed and the ‘gear’ icon has been clicked, the drop down window shown in Figure 2 should be visible. While all of the options shown in this menu are incredibly important, this step will only focus on the “Custom Command and Telemetry Configuration” option as can be seen in Figure 2, boxed in red. Clicking on this will allow the user to create custom variables within the application with their own command ID’s such that they can be used in the programming seamlessly.

Figure 2: ArxRobot Drop Down Menu

Now it is time to create custom variables and commands from within the application. Doing this will not fully complete the custom command creation process as programming still needs to be done to finalize it. In Figure 3 below, the different variable types for creating commands can be seen. This menu was achieved by clicking on the ‘+’ in the top left hand corner of the screen.  For the sake of focus, this blog post will not discuss what each variable does and instead will discuss the variables that Mini-Rosco elected to use.

Figure 3: Variable Types

Creating Custom Variables and Commands

Below in Figure 4, the list of custom commands used for Mini-Rosco can be seen. It is important to note that the two commands labeled “Mode Controls” and “Servo Controls” are not actually custom commands and only serve as section headers from within the application interface for visual and titling purposes.

Figure 4: Mini-Rosco variable List

The First command that Mini-Rosco implements is the Mode Selection command, as seen in Figure 5. This is a ‘select’ variable with the ID 0x40 (64) where the number in parenthesis is the translation of the ID into decimal format. It is important to note that the select variable allows Mini-Rosco to switch between its three stages to complete its mission; being the “Locating stage”, “Acquire stage”, and the “Follow stage”. Only one mode may be active at a time with select variable, therefore this was a perfect choice for Mini-Rosco’s mission as only one stage of the mission will be executed at a time. Below in Figure 5 is the configuration for the select variable. It should be noted that it is important to ensure that the “Remote Control” button is toggled to “ON” in order to see the variable options on the control page.

Figure 5: Select Variable Configuration

The second integral custom command used in Mini-Rosco’s mission is the Automated toggle command seen in Figure 6 below. This command is a boolean function and serves the purpose of toggling Mini-Rosco’s Automated movement mode off and on. When toggled “OFF” the goal is to be able to control Mini-Rosco in Remote control mode.

Figure 6: Automated Command Configuration

Custom Command Implementation with Programming

In this section of the blog post I will discuss how to create and finalize custom commands through the Arduino IDE. The pre-requirements for this section are only that you have a computer with the Arduino IDE installed. While this is not required, but highly encouraged, please download the latest version of the ArxRobot Library as the implementation method I will discuss for Mini-Rosco utilizes this.

Seen in the Figure below, you must declare global variables to use with your custom commands.  It is important to note that the Hex value seen next to each variable must correspond the the hex value listed as the command ID within the ArxRobot application.

Figure 7: Global Variables

The next step from within the Arduino IDE is to initialize the command list. In Mini-Rosco’s case, this was done with six custom commands seen below.

Figure 8: Command Handler Setup

Upon completing and defining the list and number of custom commands that will be used begin defining the custom commands as such. This is an example of one of the six commands that Mini-Rosco implemented. Please keep in mind that this is just the basic code needed to use the command. More code should be added on for increased customization of how the command functions.

Figure 9: moveHandler basic

Please note that the moveHandler shown in Figure 9 is simply a basic example of how to implement a custom command. As it is not the focus of this blog post, Mini-Rosco’s moveHandler will not be discussed any further here. For more information on Mini-Rosco’s move command, please click here.

Conclusion

Hopefully Mini-Rosco’s implementation of custom commands will be helpful to future generations of Mini-Rosco and even other projects. It is important to note that this is simply the basic implementation and explanation of the commands Mini-Rosco used and greater detail on this topic can be found in Mini-Rosco’s Final Blog Post.