There is no analog to digital conversion (ADC) capability directly available on
the main gumstix processor board.
Thus, the robostix add-on board was used in this prototype, due to the ADC
functionality present in its AVR ATmega128 microcontroller.
As described earlier, the gumstix and robostix boards are interconnected via
their serial ports - STUART (/dev/ttyS2) and UART0, respectively -
making data exchange between software running on both processors possible.
This feature is exploited to give the application (running on gumstix) access to
sensors attached to any ADC channels of the robostix.
The communication protocol on the robostix side consists of waiting for incoming
ASCII characters on UART0, that represent ADC channel numbers (from 0 to 7),
and responding with the current voltage value on that ADC channel,
in hexadecimal format encoded as an ASCII string (e.g. 0x03f9).
On the robostix' ATmega128 this function is implemented
with an endless loop in a C program.
Jenson Taylor
2008-01-25