Moved median logic to teensy.
Fixed the trigger threshold for new serial input.