I am making an application where I detect data from a sensor from Arduino and I want to print them together with the date and time. The data I read from the Arduino serial port is byte type, while the date and time are str.
I want to concatenate these data to print them with this line of code:
temperatura = ser.readline()
time_hhmmss = time.strftime('%H:%M:%S')
date_mmddyyyy = time.strftime('%d/%m/%Y')
print(temperatura + ',' + time_hhmmss + ',' + date_mmddyyyy)
But this error throws me: TypeError: can not concate bytes to str
I've looked for a way to concatenate them but I can not achieve it. I indicate that the data if I capture it from Arduino. I await your help. Thanks.