Added ArduinoThread library

The new code will be using the ArduinoThread library to allow cleaner
looking main file.