I have a local char variable,
local thisbyte = “”; , which I filled with data from a serial transmission buffer, like this:
thisbyte = byte.tochar(); //Converts integer read by UART into ASCII char for string representation.
I can see that thisbyte indeed contains the char value if I do:
I also have a global string variable which I defined like this
GR <- “”;
Now in my code, I want to fill GR with the value of thisbyte.
I’ve tried several things (below), and each throws an error
(cannot set property of object of type ‘string’),
based upon my poor grammar or syntax.
GR = thisbyte;
GR = byte.tochar();
any help will be appreciated. thisbyte holds a transient value that will change each time I loop over the buffer.
I’m using the global variable GR in if statements after I assign it the value of thisbyte.