I have the following hardware:
Adafruit 1.44" color TFT LCD Display with micro SD card ST7735R
Arduino UNO
I have the display working with the demo and I have worked with some other libraries with the screen. I want to try and get an image to display which has been converted to hex in a header file called "Meter.h" and I am trying out the Adafruit_GFX and Adafruit_ST7735 libraries and i am currently getting a white screen.
Wonder if anyone has any ideas what i might be doing wrong. Code below.
Code: Select all
#include <Adafruit_GFX.h> // Arduino LCD library
#include <Adafruit_ST7735.h>
#include <SPI.h> //for TFT
#include "Meter.h" // bitmap in PROGMEM
// pin definition for the Uno and TFT display
#define TFT_cs 10
#define TFT_dc 8
#define TFT_rst 9
//colours defined
#define Purple 0x69D2
//setup the screen with the defined pins
Adafruit_ST7735 tft = Adafruit_ST7735(TFT_cs, TFT_dc, TFT_rst);
void setup() {
// initialize the serial port
Serial.begin(9600);
tft.fillScreen(Black);
tft.setRotation(90);
}
void loop() {
tft.drawBitmap(64,64,AudioMeter1,128,128, Purple);
}
Code: Select all
const unsigned char AudioMeter1 [] PROGMEM = {
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,..etc, etc
};