Arduino hardware serial example. availableForWrite() Function with Arduino.