Library for managing communication over serial