MouseAir Software Block Diagram – Raspberry Pi

MouseAir Raspberry Pi Software
MouseAir Software Block Diagram

The MouseAir software is pretty simple.  At least compared to the code for ProjectCuracao (that ran to over 10,000 lines of code).   There are two main pieces of software. First is the MouseAir.py program. It consists of about 1000 lines of custom code. The second part of the program is the custom part of the RasPiConnectServer Python routine called Local.py. It is about 700 lines long and writes and reads to various files to communicate with the MouseAir.py main code. Both programs are running at the same time. You can see the data flow in the system block diagram in the block diagram below.

MouseAir Launcher Prototype Video

MouseAir Raspberry Pi Software
MouseAir Software Block Diagram

The system uses an iPad running RasPiConnect controlling a Raspberry Pi.  It can run on a local network or across the Internet. The flow from the control program (RasPiConnect) and the MouseAir.py program is through a command file.  The file is written by RasPiConnect when it detects a button push on the iPad and the MouseAir.py program reads it periodically and executes the command.  Feedback is given to RasPiConnect with the MouseAir.py program writing DONE in the command file which triggers RasPiConnect to tell the iPad the command is finished.

This command file system between MouseAir and RasPiConnect is so elegant that we are writing an article for MagPi magazine about how this is constructed.  Look for it in the June 2014 issue.  We will publish the source code on github/switchdoclabs in early May.

The full MouseAir project article will be published in the next issue of Raspberry Pi Geek.