ESP8266 with 240x240 sprites #2156
Replies: 2 comments 2 replies
-
An ESP8266 can only spare about 40kbytes for sprties. If you are using the WiFi and buffering data the spare RAM will be smaller. A 1 bit per pixel sprite would require 240240/8 = 7200 bytes This means at best you can use a 4 bit sprite. This means you then have to use a colour palette. See examples for setting bit depth and managing the palette. This example would be a good place to start, line 53 sets the colour depth. |
Beta Was this translation helpful? Give feedback.
-
So, if im use Inkscape how i can export file in 4bit ? Because when im change png to 4bit, and im set 4bit in program i dont see graphic :( |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Hi, i want make gauges on my IPS GC9A01 with ESP8266 but propably the problem is with my ram. I want crate Sprites 240x240, how can i reduce my ColorDepth to show sprites with my 240x240 ?
`void createBackground() {
gaugeBack.createSprite(190, 190);
gaugeBack.setPivot(120, 120);
tft.setPivot(160, 120);
gaugeBack.fillSprite(TFT_TRANSPARENT);
gaugeBack.pushImage(0, 0, 240, 240, SpeedoWHT);
if (millis() >+ 5000){
gaugeBack.setTextColor(COLORS);
gaugeBack.setTextDatum(MC_DATUM);
gaugeBack.setTextSize(3);
gaugeBack.drawNumber(obroty, 120, 150, 1);
}`
Beta Was this translation helpful? Give feedback.
All reactions