www.servomagazine.com/index.php?/magazine/article/april2012_MrRoboto
an Arduino UNO equivalent board
that has 128K Flash and 16K RAM,
and the CEREBOT MX3cK with the
same specs and Arduino capability,
but with the chipKIT pinout instead
of Arduino. Also in Figure 1 are
the CEREBOT MX4cK (512K
Flash/16K RAM) and MX7cK
(512K Flash/128K RAM) boards.
All are capable of being directly
programmed by the Arduino or
MPLAB. These boards range in price
from under $30 to about $120.
Their onboard development
capabilities go up with the size and
price of the board.
Okay. The boards are capable,
look cool in the color red, and have
lots of connectors, but how do we
use them? The answer involves a
bunch of wires. The CEREBOT
boards have Pmod cables that nicely
interface to Pmod boards (which
Digilent has SCORES of!). However,
the peculiar connector layout of an
Arduino-based footprint does not
lend itself well to using the Pmod
boards directly. They can be used,
but you’ll have to use solderless
jumper wires that have a six-pin
female connector on one end and a
bunch of individual female
connectors on the other. Then,
route the wires to power, ground,
and signal lines as you require.
Like I previously mentioned, I
am easily distracted and in the case
of your question, got off on a
tangent that involved making a six
servo hexapod using nine gram
servos that I got from Hobby People
for $2 each (new!) and just HAD to
build! Hobby People continually has
outrageous sales on stuff like this;
check them out at www.hobby
people.net to see what I mean.
They are an RC car and airplane
distributor, but we hobby robotics
folks use a lot of the same
electronics and equipment in our
playtime.
I am going to use six servos
connected to the MAX32 via a
PmodCON3 servo Pmod board —
actually two of them — to drive my
hexapod using an interesting idea
that I got from my friend, Dan
Michaels and his NICO robot
Figure 2
Listing 1: Some basic Arduino servo code.
// Variation of the Sweep example
// by BARRAGAN <http://barraganstudio.com>
// which is in the public domain.
#include <Servo.h>
Servo leftFront; // create servo object to control a servo
Servo leftMiddle;
Servo leftRear;
Servo rightFront;
Servo rightMiddle;
Servo rightRear;
int pos = 0; // variable to store the servo position
void setup()
{
leftFront.attach(8);
leftMiddle.attach(9);
leftRear.attach(10);
rightFront.attach(5);
rightMiddle.attach(6);
rightRear.attach(7);
}
void loop()
{
for(pos = 0; pos < 180; pos += 1) // goes from 0 to 180 degrees
{ // in steps of 1 degree
leftFront.write(pos);
leftMiddle.write(pos);
leftRear.write(pos);
rightFront.write(pos);
rightMiddle.write(pos);
rightRear.write(pos);
delay(15);
}
for(pos = 180; pos>=1; pos-=1) // goes from 180 to 0 degrees
{
leftFront.write(pos);
leftMiddle.write(pos);
leftRear.write(pos);
rightFront.write(pos);
rightMiddle.write(pos);
rightRear.write(pos);
delay(15);
}
}
SERVO 04.2012 15