Some time ago I played around the ILI9341 and added a lot of functions.
GetPixel is done by this, and returns an array with r/g/b values.
getPixel = function(x,y){
var c,z = 0xff;
setRect(x,y,x+1,y+1);
writeCMD(0x2E);
dc.write(1);
spi.send(z);
var zzz = new Uint8Array([0,0,0]);
c = spi.send(zzz);
ce.write(1);
return c;
}
To read colors of a rect would be very timeconsuming. Translating the RGB-Array to a color used for ILI9341 takes a lot of time. Some lines in assembler speeded it up, but its still slow. I don't have a tutorial for that, could only send sources, if somebody is interested.
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.
Some time ago I played around the ILI9341 and added a lot of functions.
GetPixel is done by this, and returns an array with r/g/b values.
To read colors of a rect would be very timeconsuming. Translating the RGB-Array to a color used for ILI9341 takes a lot of time. Some lines in assembler speeded it up, but its still slow. I don't have a tutorial for that, could only send sources, if somebody is interested.