An arduino sketch for controlling teensy