I realize its not gibberish, but since it wasn't what I was I wanted...
Anyway, I figured it out. I think near the beginning of my attempts I tried this but still got the same error, now I know why.
Code: Select all
uart.write('SEQ/Len(): '+str(sequence).encode('ascii')+'\r\n')
The error I got was something like
can't implicitly convert string to int
I thought it was because of variable part of the string, but if you look closely I was missing the 'b' before the "SEQ/LEN()" and that's what was causing the error.
Now everything is working as expected. The whole byte-string thing with unicode and utf-8 is a little rough to get right sometimes.
Thanks for taking a look!