Yes, what you're doing is fine - but you also need to watch out for parseInt dropping the initial zeros!
I'd just rewrite it as an array:
code = [0x80,0x87,0xFF,0x7F,0x7F,0x7F,0x7F,0x7F,0x7F,0x7F,0x8F];
Then you can convert it with:
code.map(x=>((x+256).toString(2)).substr(1)).join("")
However, with 8 bits even when you're controlling the 7 bit flip dots, are you sure it's not normal serial data? eg, with one start & stop bit per byte? It seems like the most likely option by far.
Do you have a link to the Arduino code?
Also, Espruino does have its own graphics library & fonts in that'd be easy to use for stuff like this: https://www.espruino.com/Graphics
Espruino is a JavaScript interpreter for low-power Microcontrollers. This site is both a support community for Espruino and a place to share what you are working on.
Thanks! A bit pricey, but tempting :)
Yes, what you're doing is fine - but you also need to watch out for parseInt dropping the initial zeros!
I'd just rewrite it as an array:
However, with 8 bits even when you're controlling the 7 bit flip dots, are you sure it's not normal serial data? eg, with one start & stop bit per byte? It seems like the most likely option by far.
Do you have a link to the Arduino code?
Also, Espruino does have its own graphics library & fonts in that'd be easy to use for stuff like this: https://www.espruino.com/Graphics