ArbotiX Commander V1.3 for Rev A Boards User Manual

Similar documents
FUTURELIGHT RDM PC DIRECTOR

Bluetooth + USB 16 Servo Controller [RKI-1005 & RKI-1205]

AVR Butterfly Training. Atmel Norway, AVR Applications Group

Flight Controller. Mini Fun Fly

The Answer to the 14 Most Frequently Asked Modbus Questions

Data Acquisition Module with I2C interface «I2C-FLEXEL» User s Guide

MODULE BOUSSOLE ÉLECTRONIQUE CMPS03 Référence :

Building a Basic Communication Network using XBee DigiMesh. Keywords: XBee, Networking, Zigbee, Digimesh, Mesh, Python, Smart Home

PC Base Adapter Daughter Card UART GPIO. Figure 1. ToolStick Development Platform Block Diagram

EARTH PEOPLE TECHNOLOGY SERIAL GRAPH TOOL FOR THE ARDUINO UNO USER MANUAL

Radio Control System

MeshBee Open Source ZigBee RF Module CookBook

MANUAL FOR RX700 LR and NR

ZX-NUNCHUK (# )

BLUETOOTH SERIAL PORT PROFILE. iwrap APPLICATION NOTE

Introduction to Dynamixel Motor Control Using the ArbotiX-M Robocontroller

LCD I 2 C/Serial RX Backpack. Data Sheet. LCD to I2C/Serial RX Backpack I2C or Serial RX communication with Standard 16 Pin LCD modules

Waspmote. Quickstart Guide

2013 G Miller. 3 Axis Brushless Gimbal Controller Manual

Radio Control System

IR Communication a learn.sparkfun.com tutorial

An Introduction To Simple Scheduling (Primarily targeted at Arduino Platform)

Microcontroller Systems. ELET 3232 Topic 8: Slot Machine Example

Lab 6 Introduction to Serial and Wireless Communication

B Robo Claw 2 Channel 5A Motor Controller Data Sheet

Best Robotics Sample Program Quick Start

Arduino ADK Back. For information on using the board with the Android OS, see Google's ADK documentation.

1 INTRODUCTION. This document describes the procedure to upgrade LTMR.

User Manual Revision English Converter / Adapter Ethernet to RS232 / RS485 (Order Code: HD HD M HD HD M)

RFID Logger Software User Manual Rev 1.0

User s Manual of Board Microcontroller ET-MEGA2560-ADK ET-MEGA2560-ADK

Embedded Systems Design Course Applying the mbed microcontroller

INTRODUCTION TO SERIAL ARM

TUTORIAL FOR INITIALIZING BLUETOOTH COMMUNICATION BETWEEN ANDROID AND ARDUINO

Programming and Using the Courier V.Everything Modem for Remote Operation of DDF6000

UM0853 User manual. 1 Introduction. M24LRxx application software user guide

AN601 I2C 2.8 Communication Protocol. SM130 SM130 - Mini APPLICATION NOTE

User manual Compact Web PLC WP240 series IEC-line

UPS PIco. to be used with. Raspberry Pi B+, A+, B, and A. HAT Compliant. Raspberry Pi is a trademark of the Raspberry Pi Foundation

Modbus and ION Technology

PHYS 2P32 Project: MIDI for Arduino/ 8 Note Keyboard

User Manual Revision English

AEO Head Movement Tracker X-GYRO 1000 USER MANUAL(V1.1bata )

GSM Interfacing Board

PRODUCTIVITY THROUGH INNOVATION 600 CONTROL DIRECT DRIVE TECHNICAL/OPERATION MANUAL

ROBOTC Software Inspection Guide with Additional Help Documentation

APPLICATION. Using the PB-100 to Make Calls and Announcements From a Database. Using the PB-100 for All-Call Dialing

Arduino Wifi shield And reciever. 5V adapter. Connecting wifi module on shield: Make sure the wifi unit is connected the following way on the shield:

UniPi technical documentation REV 1.1

Introduction to Arduino

Application Note AN0008. Data Logging Extension. For. Venus 8 GPS Receiver

SainSmart UNO R3 Starter Kit

Surveillance System Using Wireless Sensor Networks

RB-See-211. Seeedstudio Grove 6-15V, 2A Dual I2C Motor Driver. Grove - I2C Motor Driver. Introduction

ET-BASE AVR ATmega64/128

Dr Robot C# Advance Sputnik Demo Program

The Quadcopter Controller

Adafruit MCP9808 Precision I2C Temperature Sensor Guide

Arduino Due Back. Warning: Unlike other Arduino boards, the Arduino Due board runs at 3.3V. The maximum. Overview

EasyC. Programming Tips

PCAN-MicroMod Universal I/O Module with CAN Interface. User Manual. Document version ( )

Six-servo Robot Arm. DAGU Hi-Tech Electronic Co., LTD Six-servo Robot Arm

The BSN Hardware and Software Platform: Enabling Easy Development of Body Sensor Network Applications

STIM202 Evaluation Kit

RC2200DK Demonstration Kit User Manual

Servo Motor API nxt_motor_get_count nxt_motor_set_count nxt_motor_set_speed

Designing VM2 Application Boards

CONTENTS. What is ROBOTC? Section I: The Basics

Programming the VEX Robot

CS 326e F2002 Lab 1. Basic Network Setup & Ethereal Time: 2 hrs

DS1307 Real Time Clock Breakout Board Kit

Quick Installation. A Series of Intelligent Bar Code Reader with NeuroFuzzy Decoding. Quick Installation

USER GUIDE EDBG. Description

Programming Flash Microcontrollers through the Controller Area Network (CAN) Interface

Ethernet Interface Manual Thermal / Label Printer. Rev Metapace T-1. Metapace T-2 Metapace L-1 Metapace L-2

Bluetooth HID Profile

Microcontroller Based Low Cost Portable PC Mouse and Keyboard Tester

A DIY Hardware Packet Sniffer

DAS202Tools v1.0.0 for DAS202 Operating Manual

Modbus and ION Technology

Using Xbee in Serial Communication

PT Mbps Powerline Adapter. User Guide

KTA-223 Arduino Compatible Relay Controller

INSTRUCTION MANUAL. Installing the Software NO. XX NOTES Refer to XX134 REV. 510 SEC. 3

Using Arduino Microcontrollers to Sense DC Motor Speed and Position

eztcp Technical Document Modbus/TCP of eztcp Caution: Specifications of this document may be changed without prior notice for improvement.

A Beginner s guide to send data to Device Cloud from a ZigBee Network

DUKANE Intelligent Assembly Solutions

Arduino Lesson 16. Stepper Motors

cs281: Introduction to Computer Systems Lab08 Interrupt Handling and Stepper Motor Controller

Frequently Asked Questions (FAQs)

WIZnet S2E (Serial-to-Ethernet) Device s Configuration Tool Programming Guide

Work with Arduino Hardware

APPLICATION NOTE. Atmel AT01095: Joystick Game Controller Reference Design. 8-/16-bit Atmel Microcontrollers. Features.

Introduction. Getting familiar with chipkit Pi

MCP4725 Digital to Analog Converter Hookup Guide

Yun Shield User Manual VERSION: 1.0. Yun Shield User Manual 1 / 22.

Different Ways of Connecting to. 3DLevelScanner II. A.P.M Automation Solutions LTD. Version 3.0

Real Time Clock USB Evaluation Board V3.0

Transcription:

ArbotiX Commander V1.3 for Rev A Boards User Manual

Introduction The ArbotiX Commander is an open-source, AVR and XBEE powered, hand-held controller. It has 2 thumb joysticks and a total of 10 buttons. Required Accessories: AAA Battery XBEE Radio In-System Programmer to load custom firmware The joysticks are called Walk and Look. When using the demo code on your robot (or the default export from NUKE), the look joystick, on the right side of the commander, moves the robot around. Pushing the stick up causes the robot to walk forward. Side-to-side causes the robot to turn. The three buttons directly above the look joystick are called walk buttons 1,2, and 3. A fourth button at the top of the Commander is known as the right top button. The walk side has the same setup, except the buttons are labeled 4,5, and 6. If you enable the southpaw configuration, the look and walk joysticks will be reversed, however the button numbering remains the same. Installing Battery & XBEE The Commander requires a single AAA battery, which should be inserted into the battery holder on the back side of the controller, paying attention to the polarity. Battery life is several hours of continuous runtime, but be sure to change out the battery when the User LED starts to blink erratically. The XBEE also plugs in on the back side of the Commander. Be sure that your XBEE is paired to the one on your ArbotiX, and both are set to 38400 baud.

Writing Code for Your ArbotiX The robocontroller library (http://robocontroller.googlecode.com) includes a library for interfacing with the Commander. The Commander library can be instantiated by putting the following at the beginning of your sketch: #include <Commander.h> Commander command = Commander(); The library has several functions: void begin(int baud) Starts the library, must be called in setup(). Baud should be 38400. int ReadMsgs() void UseSouthPaw() void UseExtended() And several variables: Variable Attempts to decode messages in the Serial0 buffer, should be called at approximately 30hz to avoid buffer overrun. Returns >0 if a message is completely decoded (and parameters should thus be updated). Enables the south paw configuration, swapping look and walk joysticks. Enables the extended mode, see the hacking section on protocol for more details of what this does. Description signed char walkv Vertical displacement of the walk joystick (-100 to 100) signed char walkh Horizontal displacement of the walk joystick (-100 to 100) signed char lookv Vertical displacement of the look joystick (-100 to 100) signed char lookh Horizontal displacement of the look joystick (-100 to 100) unsigned char buttons unsigned char extra Value of the buttons, see masks below Extra byte in the protocol payload for user modifications. The masks for the buttons variable are: BUT_R1 BUT_R2 BUT_R3 BUT_L4 BUT_L5 BUT_L6 BUT_RT BUT_LT So, to read if the left top button was pressed, you would: if(command.readmsgs() > 0){ if((command.buttons&but_lt) > 0){ // do something

NUKE uses a piece of code similar to: // at the top of the file: Commander command = Commander(); // put this in your setup() function command.begin(38400); // put this in the loop() function if(command.readmsgs() > 0){ Xspeed = ((command.walkv)); if((command.buttons&but_rt) > 0) Yspeed = (command.walkh); else Rspeed = -(command.walkh)/250.0; bodyroty = (((float)command.lookv))/250.0; if((command.buttons&but_lt) > 0) bodyrotx = ((float)command.lookh)/250.0; else bodyrotz = ((float)command.lookh)/250.0; } Note that we must create an instance of the Commander class, in this case we call it command. Inside our setup() function we must call command.begin(38400) to open the serial port. This example attempts to read messages. It then sets the Xspeed (forward speed) to the vertical offset of the Commander's walk joystick pushing the stick up will walk forward. If the top button above the walk stick is pressed, we strafe by setting the Yspeed, otherwise, we turn by setting the Rspeed to the horizontal displacement of the walk joystick. Since NUKE can compute body rotations, we use the look joystick's vertical displacement to rotate around the Y axis (tilt). If the top button is pressed, we will rotate about the X axis (roll), otherwise, we rotate about the Z axis (pan), the amount that of the look joystick's horizontal displacement. Since our rotations are in radians, -100 to 100 is way too large of a range, and we need to do some conversion to reasonable values, as shown.

Hacking The ArbotiX Commander was meant to be hacked. It's open source, and all pin are brought out to something. The following sections detail how to connect new accessories or modify the firmware of your ArbotiX Commander. Prototyping Header Along the side of the AVR, there is female header for prototyping. 4 of the AVR's 6 analog pins are used to read the joysticks. The remaining two are unused, and brought out to the prototyping header. These last two analog pins also double as an I2C connection. Pin Function 1 Analog 5 (PC5), unused, I2C SCL 2 Analog 4 (PC4), unused, I2C SDA 3 Analog 3 (PC3), Look Joystick Horizontal 4 Analog 2 (PC2), Look Joystick Vertical 5 Analog 1 (PC1), Walk Joystick Horizontal 6 Analog 0 (PC0), Walk Joystick Vertical 7 Ground 8 VCC 9 VCC 10 PB5, Look Button 6 11 PB4, Look Button 5 12 PB3, Look Button 4 13 PB2, User LED 14 PB1, Look Button Top There is also a prototyping area at the top of the Commander, in between the two top buttons.

Details of Communication Protocol The Commander Protocol is quite simple to generate even on devices other than the hand held ArbotiX Commander. For instance, there is a python version included with PyPose. The core of the protocol is an 8-byte packet: Byte Name Value 1 Header 0xFF 2 Right joystick, vertical displacement 3 Right joystick horizontal displacement 4 Left joystick vertical displacement 5 Left joystick horizontal displacement Centered around 128, values can range from -125 to 125. Centered around 128, values can range from -125 to 125. Centered around 128, values can range from -125 to 125. Centered around 128, values can range from -125 to 125. 6 Button values See masks below for how this byte is configured 7 Extended Instruction See the Extended Instruction Mode for details 8 Checksum The buttons byte is mapped as follows: Bit Low Value Button R1 2 Button R2 3 Button R3 4 Button L4 5 Button L5 6 Button L6 7 Right Top Button High Left Top Button

Extended Instruction Mode The extended instruction mode allows a controlling device to read data back from the ArbotiX, or use several of the other features that would not normally be activated. This is mainly intended for using PC control on an ArbotiX that must still be inter-operable with the Commander without a firmware change. The CommEXT sketch implements the following standard: OpCode 0x00 0x08 0x10 0x11 0x1k 0x1B 0x40 0x50-k 0x50 0x50+k 0x70-k 0x70 0x70+k 0x80 0x81 0x82 0x83 0x84 Instruction Cancel extended instruction mode No Action Read Analog0 as 8-bit value Read Analog1 as 8-bit value Read AnalogK as 8-bit value Read Digital0 through Digital7 as a byte Motors Off Left Motor Reverse, (k*10)/100% of speed Left Motor Off Left Motor Forward, (k*10)/100% of speed Right Motor Reverse, (k*10)/100% of speed Right Motor Off Right Motor Forward, (k*10)/100% of speed Set Digital0 as low and input (note: the LED is tied to D0, and is toggled by the CommEXT sketch each time a packet is received). Set Digital0 as high and input (pullup enabled) Set Digital0 as low and output Set Digital0 as high and output Set Digital1 as low and input (and so on) During extended mode, the CommEXT firmware also remaps several bytes of the protocol to allow more resolution for a single high-resolution joystick: Byte Name Value 2 Pan H Upper byte of pan value. 3 Pan L Lower byte of pan value. 4 Tilt H Upper byte of tilt value. 5 Tilt L Lower byte of tilt value. A returned packet in the extended mode is quite simple. We send the 0xFF byte as a header, the instruction that was processed, the byte of data, and a checksum.

Software Setup for Custom Firmware The Commander comes preloaded with a default sketch that works with all demo code, and NUKE's default sketch. If you want to upload custom firmware to the Commander, you'll need an In-System Programmer. The ISP header is next to the left joystick. When plugged in, the ISP cable will be running upward on the commander. Setup is pretty easy: Install the Arduino IDE, following the instructions at http://arduino.cc/en/guide/homepage Download the default firmware from http://www.vanadiumlabs.com/commander Copy the following into your boards.txt commander.name=arbotix Commander (3.3V, 8 MHz) w/ ATmega168 commander.upload.maximum_size=16384 commander.upload.using=avrispmkii commander.bootloader.low_fuses=0xc2 commander.bootloader.high_fuses=0xdd commander.bootloader.extended_fuses=0x00 commander.bootloader.path=atmega commander.bootloader.file=atmegaboot_168_pro_8mhz.hex commander.bootloader.unlock_bits=0x3f commander.bootloader.lock_bits=0x0f commander.build.mcu=atmega168 commander.build.f_cpu=8000000l commander.build.core=arduino If using the recommended Pololu ISP, copy the following into your programmers.txt: avrispmkii.name=avrisp mkii avrispmkii.communication=serial avrispmkii.protocol=stk500v2 Otherwise, visit http://www.arduino.cc/en/hacking/programmer for details on using other In- System programmers with the Arduino environment. You'll then select the correct serial port, and select Commander as the board type before uploading the sketch.

Revision History September 13, 2010 V1.3 Fix CommEXT pan/tilt byte order, add note about LED. July 22, 2010 V1.2 Updated extended instruction set for actual CommEXT sketch. February 21, 2010 V1.1 Added sections detailing the protocol, updates about revisions found in RoboControllerLib 0005, including southpaw. February 10, 2010 V1.0 Document Created, in sync with RoboControllerLib 0003