LUA "Number" to Bytes
Posted: Fri Apr 20, 2018 4:03 pm
Integer firmware build. Nothing connected to A0 pin.
Custom terminal where Ctrl-Enter causes response text to display in hex until the next Enter key-press.
Why do I get an 01 instead of a 00?
Custom terminal where Ctrl-Enter causes response text to display in hex until the next Enter key-press.
Code: Select all
> uart.write(0, adc.read(0)) {Ctrl-Enter}
01 3E 20 {Enter} <-- Note: 3E 20 is the LUA prompt.
> uart.write(0, 0x0) {Ctrl-Enter}
00 3E 20 {Enter}
> uart.write(0, 0) {Ctrl-Enter}
00 3E 20 {Enter}
> =adc.read(0) {Enter}
0
>
Why do I get an 01 instead of a 00?