Moved sketch file to examples folder.
Converted to a library.
Make it compile in the Arduino IDE.