How to install mars buggy controller:

1. Make two directories in YOUR_PATH:
   mkdir YOUR_PATH/cpphlib
   mkdir YOUR_PATH/mbrc

2. Copy cpphlib.py to YOUR_PATH/cpphlib directory
   Copy mbprc.py to YOUR_PATH/mbrc directory
   Copy mbprun.sh to YOUR_PATH/mbrc directory
   Copy mbpshutdown.sh to /root directory

3. Make to executable the control program and the scripts

4. Add the following two lines to your user's .profile:

   PYTHONPATH="YOUR_PATH/cpphlib"
   export PYTHONPATH

5. Change YOUR_PATH to your path in mbprun.sh

How to start by hand:

1. Type the following commands

cd YOUR_PATH/mbrc
./mbprc.py

How to start after boot automatically, and make shutdown after exit from program:

1. Substituting YOUR_PATH append the following three lines to /etc/inittab:

#Mars buggy control autostart and keep alive, computer shutdown after exit
ASP1:2345:respawn:YOUR_PATH/mbrc/mbprun.sh
ASP2:2345:respawn:/root/mbpshutdown.sh

2. Type the command

init q

The mars buggy controller will start shortly, and if you push the button 5 in BLOCK0
on digital input card, your computer will shut down. After that, if you repower it
the computer will start mars buggy control program automatically after boot.