Added a very basic idea of some of the functionality for the Arduino code and tidied up the main C++ file.