Hi,
I am having abit of trouble and more than likely not understanding.
I am looking to put an image through the mega, 64*64 in size.
Its a SSD1351 colour OLED.
This code outputs fine on the Uno, but would display anything on the Mega.
//included libraries
#include "SPI.h" //Includes library for SPI communication of display
#include "Adafruit_GFX.h" //Includes core graphics library
#include "Adafruit_SSD1351.h" //Includes hardware specific library
extern const uint16_t smiley48[];
//screen dimensions
#define SCREEN_WIDTH 128 //pixel width
#define SCREEN_HEIGHT 128 //pixel height
//pin definitions
#define SCLK_PIN 13 //defines s clock pin
#define MOSI_PIN 11 //defines master-out slave-in SDA pin
#define RST_PIN 3 //defines reset pin
#define DC_PIN 5 //defines master-in slave-out pin
#define CS_PIN 4 //defines chip select pin
// Colour 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
#define GREY 0x8410
#define ORANGE 0xE880
Adafruit_SSD1351 display = Adafruit_SSD1351(SCREEN_WIDTH, SCREEN_HEIGHT, &SPI, CS_PIN, DC_PIN, RST_PIN);
void setup() {
display.begin();
display.fillScreen(BLACK);
}
void loop() {
display.drawRGBBitmap(0,0,smiley48,64,64);
delay(1000);
}