You would have to set the correct bits up in the arraybuffer g.buffer. Maybe:
g.buffer
var Graphics = { createArrayBuffer : function(x,y,bpp,flags) { return { buffer : new ArrayBuffer(x*y*bpp >> 3); } }}; var g = require(lcd).connect...; var a = new Uint8Array(g.buffer); a[0] = 0b01000010; a[1] = 0b00100100; a[2] = 0b00011000; a[3] = 0b00100100; a[4] = 0b01000010; g.flip();
There is no way to 'just' draw text at the moment on ESP8266.
If you used a proper Espruino board you wouldn't have that problem as there's a Graphics class with lines, text, etc built-in.
But until someone manages to compile that into ESP8266 you're out of luck.
@Gordon started
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.
You would have to set the correct bits up in the arraybuffer
g.buffer
. Maybe:There is no way to 'just' draw text at the moment on ESP8266.
If you used a proper Espruino board you wouldn't have that problem as there's a Graphics class with lines, text, etc built-in.
But until someone manages to compile that into ESP8266 you're out of luck.