Interfacing the Mark-III PIC based controller and a Linux computer

In my on again off again asperations to get a robo Magellan robot that included Linux based runtime control, I have desided to implement a dual computer based design.  The Mark-III controler will have access to all the sensors, and robot control where the Linux computer will implement the high level control and behavioral logic.

The first step in getting this to work is figureing out how to write the Mark-III and Linux software such that I have a robust communication between the two programs.  On the Mark-III I'm still using JAL.  On the Linux computer I'm using Python.  The interaction between the two systems needs to come up and work under the following conditions:
  1. Linux software starts before Mark-III is turned on
  2. Linux software starts ANY time after the Mark-III is turned on
  3. Mark-III is turned off while the Linux software is talking to it, and then turned back on after any amount of delay
  4. Mark-III is reset while the Linux software is talking to it.

Handling all these cases with the Farmer boot loader was harder than I thought.  After futzing around fo a while I came up with the following JAL / Linux protcal implemented in the JAL software running on the Mark-III:
The download includes a modified version of the sensor test JAL sample program for the Mark-III, along with the program.  To run the test you load the sensor.hex program on the Mark-III and let it run.  On the Linux host you run the program (python   Note: You may need to adjust the communications port assumed to match where you have the serial ports connected up.  Also the depends on the USPP library (

I have not tried the on OS-X or Windows but uspp documentation says that it works for Mac and Windows so give it a try and let me know how well it works.    You should be able to hook your Mark-III up using this basic techneque and implement some intersting things YMMV.