serial port experiment code