Twin Tweaks ...
THE CON1 PMOD COMES WITH HANDY WIRE TERMINALS.
A PMOD FOR HANDLING DIGITAL INPUTS.
PMOD OD1, WHICH CAN BE USED TO SUPPLY PLENTY OF
POWER TO MOTORS.
70 SERVO 11.2011
robotics kits, where programs are downloaded to and run
on the robot itself. At first blush, we hoped the I/O
Explorer would be the same way – it had not one, but two
AVR microcontrollers and we thought we could engage in
our familiar routine of downloading programs to the board
and running them on the unit. But alas, the primary
function of the I/O Explorer was to act as a peripheral
device, simply providing input to programs running on the
computer. This doesn’t sound like an insurmountable task,
and we didn’t think it would be – we just didn’t know
where to get started.
Initially, we thought we would be able to use one of
the environments with which we were familiar. Microchip’s
MPLAB, however, is meant to be used with Microchip
microcontrollers. With that in mind, we looked to AVR
Studio given the I/O Explorer’s use of the AT90USB646 and
ATmega165P Atmel microcontrollers. This didn’t seem to
work either, because AVR Studio sometimes needs a more
direct connection to the Atmel microcontroller, usually by
something like the AVR In-Circuit Emulator. Whatever the
case, AVR Studio didn’t seem to recognize the Atmel
microcontrollers embedded in the I/O Explorer. Figuring
that Micro Code Studio and Programmer’s Sketchpad would
be similarly fruitless, we mustered up the courage to foray
into new IDE (Integrated Development Environment)
The most challenging part of getting started with
the I/O Explorer was getting acquainted with a new IDE.
While the files included in the SDK can ostensibly be
implemented by any number of IDEs, we eventually
decided to go with the one that was used for the initial
development of the applications by the folks at Digilent –
Microsoft Visual Studio. We’re more comfortable with the
well appointed interface of MPLAB or the Spartan appeal
of WinAVR – the lavish and labyrinthine Microsoft Visual
Studio was initially as disorienting as Kevin Flynn’s first
trip to the Grid. We suppose that disorientation stems
from the vastness of Visual Studio when compared to
some of the other IDEs we’ve used. Instead of simply
writing source files that are downloaded directly to a robot,
Visual Studio allows users to create sophisticated
applications that bring together a veritable army of different
files and file types.
The Adept SDK comes with a veritable army of files,
and we would have to be a little more crafty than opening
the C++ source file and running it. Thankfully, Visual Studio
does have a wizard for starting a console application that
can be run from the command line which is exactly what
you need to do to interact with the I/O Explorer. With the
wizard ready to cast its spell, we just needed a sample
program to get started with.
The samples included in the Adept SDK help show off
every capability of the I/O Explorer and its Pmods. Every
sample includes a C++ source file, all of the necessary
header files, and a short text file describing what the
sample program does. Even though the source files are
C++, the code is completely compatible with C because it