Arduino IDE 3DoT Tutorial

Arduino, first and foremost, is an open‐source computer hardware and software company. The Arduino Community refers to the project and user community that designs and utilizes microcontroller‐based development boards. The 3DoT board emulates the LilyPad USB Pro. Both boards are based on ATmega32U4, operate at 3.3v at a clock frequency of 8 MHz.

Figure 1.1: LilyPad USB Pro with 3DoT Board

The most common programming approach is to use the Arduino IDE, which utilizes the C++ programming language. This gives users access to an enormous Arduino Library that is constantly growing thanks to the open‐source community.

Shown in Figure 1.2 is Arduino IDE once the application has been opened. It defaults into a blank sketch where programming can begin immediately. First, the board and port settings should be configured in order to allow code to be uploaded. Connect the Arduino board to the PC via a micro USB cable.

Configuring Arduino For the 3Dot

Shown in Figure 1.2 is Arduino IDE once the application has been opened. It defaults into a blank sketch where programming can begin immediately. First, the board and port settings should be configured in order to allow code to be uploaded. Connect the Arduino board to the PC via a micro USB cable.

To program the 3Dot board you must select “LilyPad Arduino USB”

Figure 1.2: Arduino IDE Default Window

Figure 1.3: Select “LilyPad Arduino USB” board to be programmed
using Arduino IDE

The 3DoT board will be recognized as a LilyPad Arduino USB. This means the 3DoT board can be treated as a LilyPad Arduino USB and can be uploaded with sketches like any other Arduino board.  Select the Tools pulldown menu and go to Board. This list is populated with the currently available Arduino Boards able to be programmed using Arduino IDE. For our 3DoT board, select “LilyPad Arduino USB.”

3DoT Board Setup Procedure

If Arduino IDE was downloaded before plugging in a 3DoT board, when plugging in the board, the USB drivers should have installed automatically. The most recent version of Arduino IDE should automatically recognize connected boards and label them with the respective COM port they are using.  Select the Tools pulldown menu and then Port. Here, it
should list all open COM ports and, if an Arduino board is recognized, will list its name. Select the LilyPad Arduino USB connected to the PC. If the setup was successful, the LilyPad Arduino USB and COM port should appear in the lower right‐hand corner of the Arduino window. These steps are shown below in Figure 1.4.

Figure 1.4: COM Port Setup

Testing 3Dot With Arduino – 3DoT Blink

One common procedure to test whether the board being used is properly set up is by uploading the sample sketch “Blink”. This sketch is included in all Arduino IDE releases and can be accessed by

File > Examples > 01.Basics > Blink

shown in Figure 1.5.

Figure 1.5: Access “Blink” sketch.

Standard Arduino Boards include a surface‐mounted LED labeled “L”, or “LED”, next to the “RX” and “TX” LEDs connected to digital pin 13 and named LED_BUILTIN. The 3DoT surface‐mounted LED is wired to digital pin 7. Redefine LED_BUILTIN as 7 as shown in Figure 06. Declare a new constant named LED and replace each reference to LED_BUILTIN.

#define LED_BUILTIN 7

Figure 1.6: LED_BUILTIN Redefined.

Press the “Upload” button in the upper‐left corner to upload “Blink” to the board. This sketch will blink the LED at a specified interval and is an easy way to confirm if the board was set up properly and code uploaded successfully.

Quick Guide Summary

1. Download and install Arduino IDE
2. Connect 3DoT Board to PC via a microUSB cable
3. Select connected board in Arduino IDE ( Tools > Boards > LilyPad Arduino USB )
4. Select proper COM port ( Tools > Port > COMx (LilyPad Arduino USB) )
5. Open “Blink” sketch ( File > Examples > Basics > 01.Blink )
6. Redefine LED_BUILTIN to digital pin 7
7. Click “Upload” button to upload the program to connected board
8. Confirm board is working properly by observing blinking LED

Installing the 3DoT Library

The 3DoT extension to the Arduino library adds a powerful set of functions allowing you to seamlessly control your robot.  These functions include support for the ArxRobot Android and iPhone App plus access to the Arxterra telerobotic community. In addition, the library allows you to easily customize your robot by adding new commands and telemetry channels. To install the Robot 3DoT Board library first download the library from this link below.

Then, in the Arduino IDE window, click on Sketch > Include Library  > Add .ZIP Library as shown in Figure 1.7.

Figure 1.7: Add .ZIP Library to Arduino IDE.

Navigate to the downloaded zip folder, select the folder, and click “Open” shown in Figure 1.8. Save the folder in your Arduino IDE library  or your Arduino project folder.

Figure 1.8: Select ZIP Library and add to your Arduino project folder.

3Dot Library Sample Scripts

Inside the Robot3DoTBoard examples folder you will find two sample projects. Robot_3DoT_Basic is the minimum script needed to operate your robot. Robot_3DoT_TeleComm provides samples of using built‐in and custom commands and telemetry channels. We will be referencing the second script throughout this document.

Figure 1.10: Robot_3DoT_Basic Script.