Encode your data which you are writing to serial,in your case “serialcmd” to bytes.try the following :
ser.write(serialcmd.encode())
Encode your data which you are writing to serial,in your case “serialcmd” to bytes.try the following :
ser.write(serialcmd.encode())