So you're a Noob? Post your questions here until you graduate! Don't be shy.

User avatar
By Adzmo
#64668 Hey guys, i have NodeMCU and SPI ILI9341 display, i can already send text into display through my webapp(i read whole html code and after that i parse what i need) and i wonder how to upload image through webapp into esp and after that into display.
User avatar
By vcch
#64691 One way to do it is to draw it pixel by pixel. Use this link to generate the array (a 64x64 picture is used here) http://www.digole.com/tools/PicturetoC_ ... verter.php

pic={0,0,0,0,0,0,0,0
,198,192,0,7,128,0,0,27
,238,0,0,6,192,0,0,27
,238,207,60,246,103,150,199,155
,254,217,181,158,108,219,108,219
,214,216,49,158,111,219,108,219
,198,216,49,158,108,27,108,219
,198,217,177,158,204,219,108,219
,198,207,48,247,135,155,103,155
,0,0,0,0,0,0,0,0
,0,0,0,0,0,0,0,0
,0,0,0,0,0,0,0,0
,0,0,0,0,0,7,240,0
,0,0,0,0,3,252,28,0
,0,0,0,0,6,12,6,0
,0,0,0,0,24,15,247,0
,0,0,0,31,248,23,255,0
,0,0,0,48,12,32,254,0
,0,0,0,48,13,238,62,0
,0,0,0,99,253,239,135,0
,0,0,6,195,253,239,193,128
,0,0,31,227,253,239,255,192
,0,0,32,27,253,231,255,224
,0,0,64,11,253,247,255,224
,0,0,193,251,253,249,255,240
,0,1,131,249,253,252,255,240
,0,1,3,249,253,255,31,240
,0,2,17,249,253,255,135,240
,0,4,25,249,253,255,131,240
,0,4,57,249,253,255,3,240
,0,8,252,249,251,255,7,240
,0,8,252,253,249,255,7,240
,0,8,126,253,249,255,3,224
,0,8,126,253,255,255,143,224
,0,8,62,252,255,224,135,224
,0,8,62,252,255,192,71,224
,0,13,190,126,255,0,103,224
,0,31,255,127,254,0,127,224
,0,31,255,255,254,0,127,224
,0,31,255,255,252,0,127,192
,0,31,63,255,248,0,127,128
,0,28,15,255,224,0,255,128
,0,24,1,255,224,1,255,0
,0,24,1,255,224,3,254,0
,0,24,1,255,192,7,254,0
,0,24,0,7,192,15,252,0
,0,24,0,7,192,31,252,0
,0,24,0,7,192,31,252,0
,0,24,0,7,192,63,248,0
,0,24,0,7,192,63,248,0
,0,12,0,15,224,127,248,0
,0,12,0,31,241,255,240,0
,0,12,0,127,255,255,224,0
,0,14,0,255,255,255,224,0
,0,6,7,255,255,255,192,0
,0,7,7,255,255,255,128,0
,0,3,129,255,255,255,0,0
,0,1,129,255,255,254,0,0
,0,1,195,255,255,254,0,0
,0,0,195,255,255,252,0,0
,0,0,224,255,255,252,0,0
,0,0,224,127,255,248,0,0
,0,0,224,127,255,248,0,0
,0,0,224,127,255,248,0,0}
pos=1
disp:setColor(255,0,0)
for x=127,0,-2 do
y=0
tmr.wdclr()
while (y<127) do
c=pic[pos]
pos=pos+1
for i=0,7 do
if (bit.band(c,128)==128) then
disp:drawHLine(x,y,2)
disp:drawHLine(x,y+1,2)
end
c=c+c
y=y+2
end
end
end
User avatar
By Adzmo
#64740 Yes i use Arduino IDE, in this example is used SD card right? The only possibility to do it without SD card is to draw it pixel by pixel? Problem with vcch solution is that i need to display image just by clicking upload on my website..