Converted source to arduino sketch.