I am trying to draw a bitmap for another project that I have in mind. I tried to put a test bitmap on a Nokia5110 (PCD8544) display using the Adafruit GFX library, but the bitmap turns out to be different than I drew it. I used paint.net to draw a bitmap and this website: Create bitmap from image for Nokia5110 type displays (PCD8554) to generate the array from bmp file.
original *.bmp drawing is attached below (had to convert to png to upload) and result which is printed on display is also attached below.
here is my code:
#include <SPI.h>
#include <Adafruit_GFX.h>
#include <Adafruit_PCD8544.h>
Adafruit_PCD8544 display = Adafruit_PCD8544(7, 6, 5, 4, 3);
const uint8_t displayTest_Width = 24;
const uint8_t displayTest_Height = 32;
const uint8_t PROGMEM displayTest_Bitmap[] = {
0x00, 0x00, 0xe0, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0xe0, 0x00, 0x00,
0x00, 0x00, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0xff, 0x00, 0x00, 0x00, 0xff, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1f, 0x10, 0x10, 0x10, 0x1f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
};
void setup() {
display.begin();
display.setContrast(62);
display.display();
display.clearDisplay();
}
void loop() {
display.clearDisplay();
display.drawBitmap(10, 10, displayTest_Bitmap, displayTest_Width, displayTest_Height, BLACK);
display.display();
}
![]()
![]()
