How do you code a Bitmap Image

Hi,

Very new to the 1.5 RGB OLED 128x128 module.
I can't get to grips with displaying a series of Bitmap characters to display an image.
Is there a topic on here which explains this to the novice

#define SCREEN_WIDTH 128
#define SCREEN_HEIGHT 128 // Change this to 96 for 1.27" OLED.

#define SCLK_PIN 2
#define MOSI_PIN 3
#define DC_PIN 4
#define CS_PIN 5
#define RST_PIN 6

#define BLACK 0x0000
#define BLUE 0x001F
#define RED 0xF800
#define GREEN 0x07E0
#define CYAN 0x07FF
#define MAGENTA 0xF81F
#define YELLOW 0xFFE0
#define WHITE 0xFFFF

#include <Adafruit_GFX.h>
#include <Adafruit_SSD1351.h>
#include <Adafruit_ImageReader.h>
#include <Adafruit_ImageReader_EPD.h>
#include <SPI.h>

Adafruit_SSD1351 tft = Adafruit_SSD1351(SCREEN_WIDTH, SCREEN_HEIGHT, CS_PIN, DC_PIN, MOSI_PIN, SCLK_PIN, RST_PIN);

void setup(void) {
Serial.begin(9600);
tft.begin();

Serial.println("Start up text");

}

void loop(){

tft.fillScreen(WHITE);
drawtext("X", BLACK);
tft.setCursor(60,60);
delay(1500);

tft.fillScreen(WHITE);
drawtext("X", BLACK);
tft.setCursor(20,20);
delay(1500);

tft.fillScreen(WHITE);
drawtext("X", BLACK);
tft.setCursor(30,90);
delay(1500);

}

void drawtext(char *text, uint16_t color) {
tft.setTextColor(color);
tft.setTextSize(2);
tft.print(text);
}

Code tags please! Your post breaks the rules by not using them. Please read the forum guide in the sticky posts.

I can't see any attempt in your code to display a bitmap, only some "X"s. Did you post the wrong code?

You are using the Adafruit libraries. Did you check the Adafruit website for guidance?

Welcome to the forum

Please follow the advice given in the link below when posting code, in particular the section entitled 'Posting code and common code problems'

Use code tags (the </> icon above the compose window) to make it easier to read and copy for examination

When you posted your code without code tags did you receive a warning message ?

So sorry everyone for breaking the rules and not using Code Tags. I will in future.

1 Like

You can edit your post and add them

A quick Google came up with this. It is for a different display but the principles are the same.

Thank you.

I did Google this and it didn't work.
Tomorrow I'll try once more.
My OLED is 128x128 but the Address 0x3D for 128x64 fails. I need to change this.

First off. Please post a link to the actual OLED display that you have bought. e.g. Ebay sale page.

Which Arduino are you using ? e.g. Zero, Due, Teensy4.0, ...

Your display is full-colour. Do you want to show full-colour icons ?
Or do you just want to show some monochrome bitmaps ? e.g. like big letters

It is always wise to run all of the examples that come with a particular library. These show you things that are "possible" and often give you some good ideas.

It also helps to explain your problem(s).

David.

Quite lengthy video but I think you'll get a good guideline regarding showing BITMAP images with Arduino here: How to Decode and Display Bitmap Images Using an Arduino - YouTube

#define SCREEN_WIDTH  128
#define SCREEN_HEIGHT 128 

#define SCLK_PIN 2
#define MOSI_PIN 3
#define DC_PIN   4
#define CS_PIN   5
#define RST_PIN  6

#define	BLACK           0x0000
#define	BLUE            0x001F
#define	RED             0xF800
#define	GREEN           0x07E0
#define CYAN            0x07FF
#define MAGENTA         0xF81F
#define YELLOW          0xFFE0  
#define WHITE           0xFFFF

#include <Adafruit_GFX.h>
#include <Adafruit_SSD1351.h>
#include <SPI.h>
#include <Adafruit_ImageReader.h>
#include <Adafruit_ImageReader_EPD.h>

void setup(void) {
  Serial.begin(9600);
  tft.begin();

  Serial.println("Start up text");
  
}

void loop(){




    
  tft.fillScreen(WHITE);
  drawtext("X", BLACK);
  tft.setCursor(60,60);
  delay(1500);

  tft.fillScreen(WHITE);
  drawtext("X", BLACK);
  tft.setCursor(0,0);
  delay(1500);

  tft.fillScreen(WHITE);
  drawtext("X", BLACK);
  tft.setCursor(0,0);
  delay(1500);
  
}

void drawtext(char *text, uint16_t color) {
  tft.setTextColor(color);
  tft.setTextSize(2);
  tft.print(text);
}

Have I used the Code Tags here correctly?

#define SCREEN_WIDTH  128
#define SCREEN_HEIGHT 128 

#define SCLK_PIN 2
#define MOSI_PIN 3
#define DC_PIN   4
#define CS_PIN   5
#define RST_PIN  6

#define	BLACK           0x0000
#define	BLUE            0x001F
#define	RED             0xF800
#define	GREEN           0x07E0
#define CYAN            0x07FF
#define MAGENTA         0xF81F
#define YELLOW          0xFFE0  
#define WHITE           0xFFFF

#include <Adafruit_GFX.h>
#include <Adafruit_SSD1351.h>
#include <SPI.h>
#include <Adafruit_ImageReader.h>
#include <Adafruit_ImageReader_EPD.h>

void setup(void) {
  Serial.begin(9600);
  tft.begin();

  Serial.println("Start up text");
  
}

void loop(){




    
  tft.fillScreen(WHITE);
  drawtext("X", BLACK);
  tft.setCursor(60,60);
  delay(1500);

  tft.fillScreen(WHITE);
  drawtext("X", BLACK);
  tft.setCursor(0,0);
  delay(1500);

  tft.fillScreen(WHITE);
  drawtext("X", BLACK);
  tft.setCursor(0,0);
  delay(1500);
  
}

void drawtext(char *text, uint16_t color) {
  tft.setTextColor(color);
  tft.setTextSize(2);
  tft.print(text);
}

or here?

I've brought a Waveshare 1.5 RGB OLED 128x128 display wired to the Arduino Uno R3 using the above pins.
The three X's are three experimental pages.
I would like to create an image on either page but all the example codes I have, are using the Adafruit SSD1306 library, which if I use keep bringing up error messages.
I am very new to Arduino coding, although I have experience in Raspberry pi and Python. I am just a grip of libraries and using other peoples code to teach myself the basics.

I have downloaded and used a BitMap converter to gather the code, but I'm missing something in my code to allow it to run. The correct libraries to use is one of two issues I'm having.

#include <SPI.h>
#include <Wire.h>
#include <Adafruit_GFX.h>
#include <Adafruit_SSD1306.h>
#include <Fonts/FreeMonoBoldOblique24pt7b.h>
#define SCREEN_WIDTH 128 // OLED display width, in pixels
#define SCREEN_HEIGHT 128 // OLED display height, in pixels
// Declaration for an SSD1306 display connected to I2C (SDA, SCL pins)
#define OLED_RESET     4 // Reset pin # (or -1 if sharing Arduino reset pin)
Adafruit_SSD1306 display(SCREEN_WIDTH, SCREEN_HEIGHT, &Wire, OLED_RESET);
#define bitmap_height   128
#define bitmap_width    128
static const unsigned char PROGMEM bitmap[] =
{ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1F, 0xF8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0xFF, 0xFF, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x07, 0xFF, 0xFF, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1F, 0xFF, 0xFF, 0xF8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3F, 0xFF, 0xFF, 0xFC, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0xC0, 0x07, 0xFF, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
  0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0xFF, 0x00, 0x00, 0xFF, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00,
  0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0xFC, 0x00, 0x00, 0x3F, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x00,
  0x00, 0x00, 0x00, 0x00, 0x00, 0x07, 0xF0, 0x00, 0x00, 0x0F, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x00,
  0x00, 0x00, 0x00, 0x00, 0x00, 0x0F, 0xE0, 0x00, 0x00, 0x07, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x00,
  0x00, 0x00, 0x00, 0x00, 0x00, 0x1F, 0xC0, 0x00, 0x00, 0x03, 0xF8, 0x00, 0x00, 0x00, 0x00, 0x00,
  0x00, 0x00, 0x00, 0x00, 0x00, 0x1F, 0x80, 0x00, 0x00, 0x01, 0xF8, 0x00, 0x00, 0x00, 0x00, 0x00,
  0x00, 0x00, 0x00, 0x00, 0x00, 0x3F, 0x01, 0xF8, 0x1F, 0x00, 0xFC, 0x00, 0x00, 0x00, 0x00, 0x00,
  0x00, 0x00, 0x00, 0x00, 0x00, 0x3E, 0x01, 0xFC, 0x3F, 0xC0, 0x7E, 0x00, 0x00, 0x00, 0x00, 0x00,
  0x00, 0x00, 0x00, 0x00, 0x00, 0x7E, 0x03, 0xCE, 0x79, 0xC0, 0x3E, 0x00, 0x00, 0x00, 0x00, 0x00,
  0x00, 0x00, 0x00, 0x00, 0x00, 0x7C, 0x03, 0x06, 0x60, 0xC0, 0x3E, 0x00, 0x00, 0x00, 0x00, 0x00,
  0x00, 0x00, 0x00, 0x00, 0x00, 0xF8, 0x07, 0x06, 0x70, 0xE0, 0x1F, 0x00, 0x00, 0x00, 0x00, 0x00,
  0x00, 0x00, 0x00, 0x00, 0x00, 0xF8, 0x07, 0x06, 0xE0, 0x60, 0x1F, 0x00, 0x00, 0x00, 0x00, 0x00,
  0x00, 0x00, 0x00, 0x00, 0x00, 0xF8, 0x06, 0x07, 0xC0, 0x60, 0x1F, 0x00, 0x00, 0x00, 0x00, 0x00,
  0x00, 0x00, 0x00, 0x00, 0x01, 0xF0, 0x06, 0x03, 0xC0, 0x70, 0x0F, 0x80, 0x00, 0x00, 0x00, 0x00,
  0x00, 0x00, 0x00, 0x00, 0x1F, 0xFE, 0xDE, 0x03, 0xC0, 0x75, 0xBF, 0xF8, 0x00, 0x00, 0x00, 0x00,
  0x00, 0x00, 0x00, 0x00, 0x7F, 0xFF, 0xFC, 0x03, 0xC0, 0x3F, 0xFF, 0xFE, 0x00, 0x00, 0x00, 0x00,
  0x00, 0x00, 0x00, 0x00, 0xFF, 0xF7, 0xFC, 0x01, 0xC0, 0x3F, 0xEF, 0xFF, 0x00, 0x00, 0x00, 0x00,
  0x00, 0x00, 0x00, 0x01, 0xC0, 0x00, 0x1C, 0x01, 0x80, 0x18, 0x00, 0x03, 0x80, 0x00, 0x00, 0x00,
  0x00, 0x00, 0x00, 0x01, 0xC0, 0x00, 0x08, 0x21, 0x84, 0x30, 0x00, 0x03, 0x80, 0x00, 0x00, 0x00,
  0x00, 0x00, 0x00, 0x01, 0x80, 0x00, 0x08, 0x20, 0x84, 0x00, 0x00, 0x01, 0x80, 0x00, 0x00, 0x00,
  0x00, 0x00, 0x00, 0x01, 0xC0, 0x00, 0x00, 0x60, 0x06, 0x00, 0x00, 0x03, 0x80, 0x00, 0x00, 0x00,
  0x00, 0x00, 0x00, 0x00, 0xF5, 0x55, 0x00, 0x70, 0x0E, 0x00, 0x56, 0xBF, 0x00, 0x00, 0x00, 0x00,
  0x00, 0x00, 0x00, 0x00, 0x7F, 0xFF, 0x80, 0x70, 0x0E, 0x01, 0xFF, 0xFF, 0x00, 0x00, 0x00, 0x00,
  0x00, 0x00, 0x00, 0x00, 0x3F, 0xFF, 0x00, 0xF0, 0x0F, 0x01, 0xFF, 0xFC, 0x00, 0x00, 0x00, 0x00,
  0x00, 0x00, 0x00, 0x00, 0x01, 0xF1, 0x80, 0xF8, 0x1F, 0x01, 0x8F, 0x80, 0x00, 0x00, 0x00, 0x00,
  0x00, 0x00, 0x00, 0x00, 0x00, 0xF9, 0xC0, 0xF8, 0x1F, 0x01, 0x8F, 0x00, 0x00, 0x00, 0x00, 0x00,
  0x00, 0x00, 0x00, 0x00, 0x00, 0xF9, 0xC0, 0xD8, 0x1B, 0x83, 0x9F, 0x00, 0x00, 0x00, 0x00, 0x00,
  0x00, 0x00, 0x00, 0x00, 0x00, 0xF8, 0xC1, 0xDC, 0x1B, 0x83, 0x1F, 0x00, 0x00, 0x00, 0x00, 0x00,
  0x00, 0x00, 0x00, 0x00, 0x00, 0x7C, 0xE1, 0x9C, 0x39, 0x87, 0x3F, 0x00, 0x00, 0x00, 0x00, 0x00,
  0x00, 0x00, 0x00, 0x00, 0x00, 0x7E, 0x63, 0x8E, 0x39, 0xC7, 0x3E, 0x00, 0x00, 0x00, 0x00, 0x00,
  0x00, 0x00, 0x00, 0x00, 0x00, 0x7E, 0xFF, 0x8F, 0xF0, 0xFE, 0x7E, 0x00, 0x00, 0x00, 0x00, 0x00,
  0x00, 0x00, 0x00, 0x00, 0x00, 0x3F, 0x3E, 0x07, 0xE0, 0xFC, 0xFC, 0x00, 0x00, 0x00, 0x00, 0x00,
  0x00, 0x00, 0x00, 0x00, 0x00, 0x1F, 0x94, 0x02, 0x80, 0x29, 0xF8, 0x00, 0x00, 0x00, 0x00, 0x00,
  0x00, 0x00, 0x00, 0x00, 0x00, 0x1F, 0x80, 0x00, 0x00, 0x01, 0xF8, 0x00, 0x00, 0x00, 0x00, 0x00,
  0x00, 0x00, 0x00, 0x00, 0x00, 0x0F, 0xE0, 0x00, 0x00, 0x07, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x00,
  0x00, 0x00, 0x00, 0x00, 0x00, 0x07, 0xF0, 0x00, 0x00, 0x0F, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x00,
  0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0xF8, 0x00, 0x00, 0x1F, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x00,
  0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0xFE, 0x00, 0x00, 0x7F, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00,
  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0x80, 0x03, 0xFF, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7F, 0xFA, 0xBF, 0xFE, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1F, 0xFF, 0xFF, 0xF8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0F, 0xFF, 0xFF, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0xFF, 0xFF, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3F, 0xFC, 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, 0xC0, 0x01, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
  0x00, 0x00, 0x00, 0x00, 0x0C, 0xD8, 0x01, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
  0x00, 0x00, 0x00, 0x00, 0x0C, 0xD8, 0x01, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
  0x00, 0x00, 0x00, 0x00, 0x00, 0xC0, 0x01, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
  0x00, 0x00, 0x00, 0xFB, 0x8C, 0xD8, 0x71, 0xB9, 0xB3, 0x80, 0x71, 0xC6, 0xCC, 0x00, 0x00, 0x00,
  0x00, 0x00, 0x00, 0xFF, 0xCC, 0xD9, 0xF9, 0xFD, 0xFF, 0xC1, 0xF7, 0xE7, 0xFE, 0x00, 0x00, 0x00,
  0x00, 0x00, 0x00, 0xCC, 0xCC, 0xD9, 0x9D, 0xDD, 0x98, 0xC1, 0x86, 0x76, 0x66, 0x00, 0x00, 0x00,
  0x00, 0x00, 0x00, 0xCC, 0xCC, 0xD9, 0x8D, 0x8D, 0x98, 0xC1, 0x86, 0x36, 0x66, 0x00, 0x00, 0x00,
  0x00, 0x00, 0x00, 0xCC, 0xCC, 0xD9, 0x9D, 0x8D, 0x98, 0xC9, 0x86, 0x76, 0x66, 0x00, 0x00, 0x00,
  0x00, 0x00, 0x00, 0xCC, 0xCC, 0xD9, 0xF9, 0x8D, 0x98, 0xDD, 0xF7, 0xE6, 0x66, 0x00, 0x00, 0x00,
  0x00, 0x00, 0x00, 0xCC, 0xCC, 0xD8, 0x71, 0x8D, 0x98, 0xC8, 0x71, 0xC6, 0x66, 0x00, 0x00, 0x00,
  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
};
void setup() {
  Serial.begin(9600);
  // SSD1306_SWITCHCAPVCC = generate display voltage from 3.3V internally
  if (!display.begin(SSD1306_SWITCHCAPVCC, 0x3C)) { // Address 0x3D for 128x64
    Serial.println(F("SSD1306 allocation failed"));
    for (;;); // Don't proceed, loop forever
  }
  // Clear the buffer
  display.clearDisplay();
}
void loop() {
  showBitmap();
}
void showBitmap(void) {
  display.clearDisplay();
  display.drawBitmap(0, 0, bitmap, bitmap_height, bitmap_width, WHITE);
  display.display();
  delay(1000);
}

This is a complete code I used with the SSD_1306 library but won't work

Please provide a link so that we don't have to guess.

I can find https://www.waveshare.com/product/displays/lcd-oled/lcd-oled-3/1.5inch-rgb-oled-module.htm
but I am only guessing.
You bought the item. You know what is on your desk.

Do you want to show a small full-colour icon or just a monochrome image ?

You need an SD card or external Flash memory chip for large colour images.

It should be pretty straightforward if you explain what you want.
Otherwise we just have to guess !!

David.

First off. Install Adafruit_SSD1351 via the IDE Library Manager.
Then run all of the examples.

Ok, there are not many examples. But at least it shows you how to write a constructor and call several Adafruit_GFX methods.

Then you simply experiment with the different Adfruit_GFX methods

  void drawBitmap(int16_t x, int16_t y, const uint8_t bitmap[], int16_t w,
                  int16_t h, uint16_t color);
  void drawBitmap(int16_t x, int16_t y, const uint8_t bitmap[], int16_t w,
                  int16_t h, uint16_t color, uint16_t bg);
  void drawBitmap(int16_t x, int16_t y, uint8_t *bitmap, int16_t w, int16_t h,
                  uint16_t color);
  void drawBitmap(int16_t x, int16_t y, uint8_t *bitmap, int16_t w, int16_t h,
                  uint16_t color, uint16_t bg);
  void drawXBitmap(int16_t x, int16_t y, const uint8_t bitmap[], int16_t w,
                   int16_t h, uint16_t color);

And later on, you can experiment with colour images.

  void drawRGBBitmap(int16_t x, int16_t y, const uint16_t bitmap[], int16_t w,
                     int16_t h);
  void drawRGBBitmap(int16_t x, int16_t y, uint16_t *bitmap, int16_t w,
                     int16_t h);
  void drawRGBBitmap(int16_t x, int16_t y, const uint16_t bitmap[],
                     const uint8_t mask[], int16_t w, int16_t h);
  void drawRGBBitmap(int16_t x, int16_t y, uint16_t *bitmap, uint8_t *mask,
                     int16_t w, int16_t h);

Here is your bitmap working on an SSD1351. Please note that this is my wiring scheme. Please try it for yourself. See if you can spot the deliberate mistake.

#define SCREEN_WIDTH  128
#define SCREEN_HEIGHT 128 // Change this to 96 for 1.27" OLED.

// You can use any (4 or) 5 pins
#define SCLK_PIN 13
#define MOSI_PIN 11
#define DC_PIN   9
#define CS_PIN   10
#define RST_PIN  8

// Color definitions
#define BLACK           0x0000
#define BLUE            0x001F
#define RED             0xF800
#define GREEN           0x07E0
#define CYAN            0x07FF
#define MAGENTA         0xF81F
#define YELLOW          0xFFE0
#define WHITE           0xFFFF

#include <Adafruit_GFX.h>
#include <Adafruit_SSD1351.h>
#include <SPI.h>

// Option 1: use any pins but a little slower
Adafruit_SSD1351 tft = Adafruit_SSD1351(SCREEN_WIDTH, SCREEN_HEIGHT, CS_PIN, DC_PIN, MOSI_PIN, SCLK_PIN, RST_PIN);

// Option 2: must use the hardware SPI pins
// (for UNO thats sclk = 13 and sid = 11) and pin 10 must be
// an output. This is much faster - also required if you want
// to use the microSD card (see the image drawing example)
//Adafruit_SSD1351 tft = Adafruit_SSD1351(SCREEN_WIDTH, SCREEN_HEIGHT, &SPI, CS_PIN, DC_PIN, RST_PIN);

#define bitmap_height   128
#define bitmap_width    128

static const unsigned char PROGMEM bitmap[] =
{   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1F, 0xF8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0xFF, 0xFF, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x07, 0xFF, 0xFF, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1F, 0xFF, 0xFF, 0xF8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3F, 0xFF, 0xFF, 0xFC, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0xC0, 0x07, 0xFF, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
    0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0xFF, 0x00, 0x00, 0xFF, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00,
    0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0xFC, 0x00, 0x00, 0x3F, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x00,
    0x00, 0x00, 0x00, 0x00, 0x00, 0x07, 0xF0, 0x00, 0x00, 0x0F, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x00,
    0x00, 0x00, 0x00, 0x00, 0x00, 0x0F, 0xE0, 0x00, 0x00, 0x07, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x00,
    0x00, 0x00, 0x00, 0x00, 0x00, 0x1F, 0xC0, 0x00, 0x00, 0x03, 0xF8, 0x00, 0x00, 0x00, 0x00, 0x00,
    0x00, 0x00, 0x00, 0x00, 0x00, 0x1F, 0x80, 0x00, 0x00, 0x01, 0xF8, 0x00, 0x00, 0x00, 0x00, 0x00,
    0x00, 0x00, 0x00, 0x00, 0x00, 0x3F, 0x01, 0xF8, 0x1F, 0x00, 0xFC, 0x00, 0x00, 0x00, 0x00, 0x00,
    0x00, 0x00, 0x00, 0x00, 0x00, 0x3E, 0x01, 0xFC, 0x3F, 0xC0, 0x7E, 0x00, 0x00, 0x00, 0x00, 0x00,
    0x00, 0x00, 0x00, 0x00, 0x00, 0x7E, 0x03, 0xCE, 0x79, 0xC0, 0x3E, 0x00, 0x00, 0x00, 0x00, 0x00,
    0x00, 0x00, 0x00, 0x00, 0x00, 0x7C, 0x03, 0x06, 0x60, 0xC0, 0x3E, 0x00, 0x00, 0x00, 0x00, 0x00,
    0x00, 0x00, 0x00, 0x00, 0x00, 0xF8, 0x07, 0x06, 0x70, 0xE0, 0x1F, 0x00, 0x00, 0x00, 0x00, 0x00,
    0x00, 0x00, 0x00, 0x00, 0x00, 0xF8, 0x07, 0x06, 0xE0, 0x60, 0x1F, 0x00, 0x00, 0x00, 0x00, 0x00,
    0x00, 0x00, 0x00, 0x00, 0x00, 0xF8, 0x06, 0x07, 0xC0, 0x60, 0x1F, 0x00, 0x00, 0x00, 0x00, 0x00,
    0x00, 0x00, 0x00, 0x00, 0x01, 0xF0, 0x06, 0x03, 0xC0, 0x70, 0x0F, 0x80, 0x00, 0x00, 0x00, 0x00,
    0x00, 0x00, 0x00, 0x00, 0x1F, 0xFE, 0xDE, 0x03, 0xC0, 0x75, 0xBF, 0xF8, 0x00, 0x00, 0x00, 0x00,
    0x00, 0x00, 0x00, 0x00, 0x7F, 0xFF, 0xFC, 0x03, 0xC0, 0x3F, 0xFF, 0xFE, 0x00, 0x00, 0x00, 0x00,
    0x00, 0x00, 0x00, 0x00, 0xFF, 0xF7, 0xFC, 0x01, 0xC0, 0x3F, 0xEF, 0xFF, 0x00, 0x00, 0x00, 0x00,
    0x00, 0x00, 0x00, 0x01, 0xC0, 0x00, 0x1C, 0x01, 0x80, 0x18, 0x00, 0x03, 0x80, 0x00, 0x00, 0x00,
    0x00, 0x00, 0x00, 0x01, 0xC0, 0x00, 0x08, 0x21, 0x84, 0x30, 0x00, 0x03, 0x80, 0x00, 0x00, 0x00,
    0x00, 0x00, 0x00, 0x01, 0x80, 0x00, 0x08, 0x20, 0x84, 0x00, 0x00, 0x01, 0x80, 0x00, 0x00, 0x00,
    0x00, 0x00, 0x00, 0x01, 0xC0, 0x00, 0x00, 0x60, 0x06, 0x00, 0x00, 0x03, 0x80, 0x00, 0x00, 0x00,
    0x00, 0x00, 0x00, 0x00, 0xF5, 0x55, 0x00, 0x70, 0x0E, 0x00, 0x56, 0xBF, 0x00, 0x00, 0x00, 0x00,
    0x00, 0x00, 0x00, 0x00, 0x7F, 0xFF, 0x80, 0x70, 0x0E, 0x01, 0xFF, 0xFF, 0x00, 0x00, 0x00, 0x00,
    0x00, 0x00, 0x00, 0x00, 0x3F, 0xFF, 0x00, 0xF0, 0x0F, 0x01, 0xFF, 0xFC, 0x00, 0x00, 0x00, 0x00,
    0x00, 0x00, 0x00, 0x00, 0x01, 0xF1, 0x80, 0xF8, 0x1F, 0x01, 0x8F, 0x80, 0x00, 0x00, 0x00, 0x00,
    0x00, 0x00, 0x00, 0x00, 0x00, 0xF9, 0xC0, 0xF8, 0x1F, 0x01, 0x8F, 0x00, 0x00, 0x00, 0x00, 0x00,
    0x00, 0x00, 0x00, 0x00, 0x00, 0xF9, 0xC0, 0xD8, 0x1B, 0x83, 0x9F, 0x00, 0x00, 0x00, 0x00, 0x00,
    0x00, 0x00, 0x00, 0x00, 0x00, 0xF8, 0xC1, 0xDC, 0x1B, 0x83, 0x1F, 0x00, 0x00, 0x00, 0x00, 0x00,
    0x00, 0x00, 0x00, 0x00, 0x00, 0x7C, 0xE1, 0x9C, 0x39, 0x87, 0x3F, 0x00, 0x00, 0x00, 0x00, 0x00,
    0x00, 0x00, 0x00, 0x00, 0x00, 0x7E, 0x63, 0x8E, 0x39, 0xC7, 0x3E, 0x00, 0x00, 0x00, 0x00, 0x00,
    0x00, 0x00, 0x00, 0x00, 0x00, 0x7E, 0xFF, 0x8F, 0xF0, 0xFE, 0x7E, 0x00, 0x00, 0x00, 0x00, 0x00,
    0x00, 0x00, 0x00, 0x00, 0x00, 0x3F, 0x3E, 0x07, 0xE0, 0xFC, 0xFC, 0x00, 0x00, 0x00, 0x00, 0x00,
    0x00, 0x00, 0x00, 0x00, 0x00, 0x1F, 0x94, 0x02, 0x80, 0x29, 0xF8, 0x00, 0x00, 0x00, 0x00, 0x00,
    0x00, 0x00, 0x00, 0x00, 0x00, 0x1F, 0x80, 0x00, 0x00, 0x01, 0xF8, 0x00, 0x00, 0x00, 0x00, 0x00,
    0x00, 0x00, 0x00, 0x00, 0x00, 0x0F, 0xE0, 0x00, 0x00, 0x07, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x00,
    0x00, 0x00, 0x00, 0x00, 0x00, 0x07, 0xF0, 0x00, 0x00, 0x0F, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x00,
    0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0xF8, 0x00, 0x00, 0x1F, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x00,
    0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0xFE, 0x00, 0x00, 0x7F, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00,
    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0x80, 0x03, 0xFF, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7F, 0xFA, 0xBF, 0xFE, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1F, 0xFF, 0xFF, 0xF8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0F, 0xFF, 0xFF, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0xFF, 0xFF, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3F, 0xFC, 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, 0xC0, 0x01, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
    0x00, 0x00, 0x00, 0x00, 0x0C, 0xD8, 0x01, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
    0x00, 0x00, 0x00, 0x00, 0x0C, 0xD8, 0x01, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
    0x00, 0x00, 0x00, 0x00, 0x00, 0xC0, 0x01, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
    0x00, 0x00, 0x00, 0xFB, 0x8C, 0xD8, 0x71, 0xB9, 0xB3, 0x80, 0x71, 0xC6, 0xCC, 0x00, 0x00, 0x00,
    0x00, 0x00, 0x00, 0xFF, 0xCC, 0xD9, 0xF9, 0xFD, 0xFF, 0xC1, 0xF7, 0xE7, 0xFE, 0x00, 0x00, 0x00,
    0x00, 0x00, 0x00, 0xCC, 0xCC, 0xD9, 0x9D, 0xDD, 0x98, 0xC1, 0x86, 0x76, 0x66, 0x00, 0x00, 0x00,
    0x00, 0x00, 0x00, 0xCC, 0xCC, 0xD9, 0x8D, 0x8D, 0x98, 0xC1, 0x86, 0x36, 0x66, 0x00, 0x00, 0x00,
    0x00, 0x00, 0x00, 0xCC, 0xCC, 0xD9, 0x9D, 0x8D, 0x98, 0xC9, 0x86, 0x76, 0x66, 0x00, 0x00, 0x00,
    0x00, 0x00, 0x00, 0xCC, 0xCC, 0xD9, 0xF9, 0x8D, 0x98, 0xDD, 0xF7, 0xE6, 0x66, 0x00, 0x00, 0x00,
    0x00, 0x00, 0x00, 0xCC, 0xCC, 0xD8, 0x71, 0x8D, 0x98, 0xC8, 0x71, 0xC6, 0x66, 0x00, 0x00, 0x00,
    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
};
void setup() {
    tft.begin();
}
void loop() {
    showBitmap();
}
void showBitmap(void) {
    tft.fillScreen(BLACK);
    tft.drawBitmap(0, 0, bitmap, bitmap_height, bitmap_width, RED, WHITE); //
    delay(1000);
}

thank you for your help David

Sorting through all the Google advice, I realise now that there is an Waveshare 1.5 RGB OLED with a built in SD card. I obviously didn't see this when I brought mine.

Please confirm whether my guess in #5 was correct.

I can't see any Waveshare OLED with SD card. If you can find one, please post a link.

Your Uno has enough Flash memory to hold 4 or 5 128x128 monochrome images. But you would struggle to contain a single 64x64 RGB image.

If you have an SD card, you can store 1000s of full-colour full-size images.

Have you spotted the deliberate mistake in #16 ?
Have you tried different colours ?
Monochrome can mean two distinct colours e.g. foreground and background.

David.

Yes, with colour images, only the first half of the image shows with the bottom half displaying nothing recognisable. I guess this is because as you say, in colour and not enough flash memory. I will need an SD Card for larger files. I'm about to do the same but in monochrome.

Where do I find #5 and #16? I guess it means item 5 and 16?

Your code works and I managed to change the code, so that the screen starts black, displays the image for 15 seconds and then turns black again without the loop.

I've saved so much info off the net that I can't find stuff at the moment. Will send a link when I've found it.

Lost my link to that bitmap conversion tools

The deliberate mistake is drawing a 128x128 image from a 128x64 array. The bottom half is displaying garbage from the Flash memory (i.e. the executable code)

Monochrome is simply 1 or 0. You can display whichever colour you like for 1 and whatever background colour you want for 0. e.g. WHITE and BLACK.
My example shows RED foreground (1) and WHITE background (0).

That is why I showed you the different styles of drawBitmap() in message #16.

This is nothing to do with drawRGBBitmap() which uses much more memory.

Regarding message numbers like #1 or #2. The Forum used to display the message #N in the top right of each message. The Forum seems to be broken today.

Yes, it would be nice to see a link for an OLED with SD card.

But you can store many monochrome images in the Uno Flash. Obviously the number of images depends on their size. e.g. 32x32, 128x64, 128x128, ...

David.