Serial Port Question

I am doing some testing with the new serial port module. It is a little function that just reads incoming data. When it is reading it translates what I am sending (a, b, hello, etc.) into the ascii characters when I use readUntil() eg. “b” would read as 98. Using the readBytes() function will read “Yg==”.


textByte = readBytes(port2, 1)
textUntil = readUntil(port2, “,” 0)
system.tag.writeToTag(“Byte”, textByte) # YQ==
system.tag.writeToTag(“Text”, textUntil) # 97

Python uses chr(“numbers”) to translate from ascii to text and there is another utility bas64.base64(“numbers”) to translate from base64. Neither of these seem to work for me, but I am new to Python and could very well be missing a step.

any suggestions?


I seem to have missed the question in here, I think. Are you trying to convert the byte you read into a string?

Ok, actually I think I see the problem with readUntil(). I’ll have to fix this for the next release.