Hey guys hopefully this is the right place to ask this, but im having some problems trying to draw a bitmap on my 1.8" TFT display via the Adafruit GFX library. Ive been following THIS video guide on how to generate the bitmap code and ive used both the Image2Code Java Utility as well as LCD Image Converter and neither have worked properly. When I try to draw the bitmap all I get is a jumbled mess of pixels on my LCD. Ive tried making the image smaller, repositioning it, rotating it, defining the drawBitmap void in my own sketch and not using the library, nothing has worked. If anybody has any idea why this isnt working that would be great, thanks! Pic and relevant code below. FYI the Yellow and White Characters are drawn afterwards so ignore them.
EDIT: Also THIS is the link to the actual image im trying to draw.
#include "LowPower.h" #include <Adafruit_GFX.h> // Core graphics library #include <Adafruit_ST7735.h> // Hardware-specific library #include <SPI.h> //TFT Display pins, LED to 3.3v VCC to 5V #define TFT_CS 10 //CS pin to D10 #define TFT_RST 9 //RESET to P9 #define TFT_DC 8 //A0 to D8 Adafruit_ST7735 tft = Adafruit_ST7735(TFT_CS, TFT_DC, TFT_RST); #define TFT_SCLK 13 //SCK to D13 #define TFT_MOSI 11 //SDA to D11 //Main bitmap images stored in Bitmaps.c extern uint8_t MainTFTDisplayBitmap; //Main Background Image tft.initR(INITR_BLACKTAB); //TFT Display init uint16_t time = millis(); tft.fillScreen(ST7735_BLACK); time = millis() - time; tft.setTextWrap(false); tft.setRotation(1); delay(500); //Draw the main background bitmap, doesnt change so only needs to be called once tft.drawBitmap(0,0,MainTFTDisplayBitmap,160,128,ST7735_BLUE); delay(100);
HERE is a link to the bitmap stored in my Bitmaps.c file in PROGMEM