ProtoCylon: Tell Me How You Feel
By Bobby Neal Winters
I’ve
discovered that it’s been exactly two months to the day since I’ve
blogged about my robots. There is an alphabet of reasons: HLC, PSU in
PY, and NALM. This is to day we had an accreditation visit at the
university in early March; I took a trip to Paraguay in Mid-March; then
in late March and early April I’ve been mowing the lawn and watching my
beautiful, youngest daughter play soccer on the weekends. While I could
whine a little about getting older and not bouncing back from the
Paraguay trip as quickly as I would’ve liked, I will skip that.
Suffice
it to say that this weekend, my beautiful, youngest daughter played
soccer on Friday night; I mowed Saturday morning; then Saturday
afternoon I began to play, er, work seriously on my robot once more. I
decided I needed to know when it thought it was stuck so I put a couple
of LEDs in the system to let me know what state it was in: trapped or
not trapped. I did this and promptly the robot ceased to function
correctly.
The
robot is supposed to go straight until it encounters an object. When
it encounters an object, it goes into a trapped state and accesses its
getFree function. In its get free function, it turns alternately left
and right in a struggle to get free.
After I installed my upgrades, this no longer happened. It seemed to simple act as if it were trapped all the time.
I was confused.
I
know what you are thinking: When I put in the LEDs, I messed something
up. That was the first thing I thought, so I inspected the program to
look for conflicts and found none. (Remember this sentence verbatim
because its important.) Having dealt with the programming issues, I
began to inspect my motor shield. This is the special board I’ve got my
motors hooked to the Arduino through. I did a bit of experimenting,
including changing how the motors were hooked to the motor shield.
This
experimentation determined that the motors were both fine, but there
seemed to be a problem with electrical connections for the right wheel
motor. I suspected a short. I thought--briefly--about desoldering it
to fix it. I thought--longer--about buying a new motor shield. Then
today as I was playing, er, working on it seriously, I read the top of
the motor shield. It is quite an intricate little device with places to
hoot in servos and what have you.
I
was looking it over and saw that by Pin 9, to which I had hooked an
LED, there was a label that read Brake A. When I was sending current to
Pin 9 to light that LED, I was applying Brake A which was (drum roll
please) the right side. I moved the LED and the problem was solved.
It was a little thing, but it gave me such a RUSH!
It’s that childlike feeling of discovery. I hope I never lose it.