Sketch of serial controller for Arduino.