-
hello @Gordon,
i have no predefined solution to switch on led on the matrix.
i just want to solve my prob who is that i have a graphic arrayBuffer with a font drawing and want to HIGH or LOW the pin of the espruino to display the content of the buffer on the matrix.
As i see in the datasheet of the matrix, it seems easier to pilot the display by line. but i haven't a good enough tech background to be sure of that. Your (@Gordon and @allObjects) attempts to explain are futile since I do not know how to switch from an arrayBuffer to a properly lit matrix with some digitalWrite()I ask you to forgive my gross ignorance. Shame on me.
All seems so simple for you!
not for me.
can iDigitalWrite(*array of pins*, *array of value like the b[i].toString(2)*)
?// pin of the matrix wired on the espruino const x= [A6,A5,A8,B7,B6]; const y=[B5,B4,B3,A7,B1,B10,B13]; //to ground???? let g = Graphics.createArrayBuffer(8,7,1); var b = new Uint8Array(g.buffer); for (let i=0; i<???;i++) { digitalWrite(???,???) }
You can push out line by line, but if so, I'd suggest:
Graphics 'packs' pixels as close together as they will go, so if you have a width of 5 then each row will get spread over your
b
array. If you have a width of 8 pixels then every element ofb
will represent a row, which is what you want.You can also use
g.getPixel
to get a single pixel out of Graphics - but it'll be a lot slower than accessing a whole row withb[i]
.