I have some code which reads in messages from the serial port and shoves it into a buffer:
Code: Select all
buffer = buffer[:-2]
br = buffer.split("=")[1]
brightness = int(br)
print(brightness)
Code: Select all
ValueError: invalid syntax for integer with base 10: '0'
I'm probably missing something very obvious here but I cant seem to figure it out, any help would be appreciated.
Thanks