replace uchar by uint8_t, add option to choose serial port