Imported libraries and example from http://arduinocode.codeplex.com/