jpg (from sd) to 4bit sprite? #2689
Replies: 1 comment
-
TFT readwrite sketch gives me these errors: Pixel value written = 8 I have not connected tft to MISO, or is this not supported by the lcd? Besides that, reading from tft_output(x y w h, bitmap) = .... tft_output(x y w h, bitmap) = Which im trying to store in a new array of 200*200 pixels (40kb array). What i would like is reading jpg from sd and store in array A little nudge in the right direction would be ever so helpful :) |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
First of all, thanks for this fantastic library. Without it i'd be still reading the datasheet (:
What im trying to do is create a GPS, with an ESP32-wroom(4mb) and ILI9341 ( with SD card).
On the sd i have about 90 jpgs (96*96px) in map '001', starting from row-1-column-1.jpg to row-5-column-18.jpg
( https://github.com/337design/sdcard )
My idea was to read a few images of SD, and draw them into a 4bit sprite [1].
After that id move the sprite every second (or 2) so center is the new GPS position, and wherever the sprite would be blank, id reread the sd and fill those parts.
Except..
- Reading from sdcard to tft draws image to screen.
- Reading from sdcard to (4/8/16bit) sprite look like random pixels.
Sketch is included.
Currently setting spr.createPalette tocolor depth 16. I get the same result as 4 or 8bit.
sprite size is 100x100, should be 200x200 or 240x240 with 4bit.
Ive already tried to make vector based map from OSM files. Even when just extracting main roads it takes way to long, perhaps i can use it to draw a gpx file on the map later.
Ive also tried to read array from SDcard, but size is much bigger than jpg. Perhaps .bin file would be a solution.
So i think, since esp32wroom has ~0.5mb ram, i need to get SDjpg to 4bit sprite.
(maybe i can extend ram or use wrover, but rather id make it work with what i got)
Also, this is my first post on github. Its been almost a year since i programmed my first arduino. Have done some webdesign before that, so my c/c++ knowledge is still very basic.
Many thanks in advance!
[1] ideally i can read the jpg from the sd and store them in an array that is 32px bigger than sprite. The next GPSposition push array to start at (x,y), push to screen and start reading missing pixels from sdcard until next interrupt.
SKETCH
Beta Was this translation helpful? Give feedback.
All reactions