added code for serial communication, compilation OK but does not work yet