example modified to use HW serial port