I'm currently writing Go code which reads a sensor value through an Arduino using the serial port. Currently I am getting "" and " " in my output. I know in Python, you can do:
line = line.decode('utf-8')
to get rid of the characters. How would you do that using Golang? I'm fairly new to the language so any help would be appreciated! Here is what a snippet of the output looks like currently:
"arduinoLED\"}
{\"temperature\"
Also if anyone could let me know how I can read a line in Go (similar to Python's line.readline()
) that would be great.
Many thanks!