Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- #include <Adafruit_GFX.h>
- #include <Adafruit_SSD1331.h>
- const int8_t SCL_PIN = 14; //sclk
- const int8_t SDA_PIN = 13; //mosi
- const int8_t CS_PIN = 25; //cs
- const int8_t RES_PIN = 26; //rst
- const int8_t DC_PIN = 27; //dc
- const uint16_t BLACK = 0x0000;
- const uint16_t WHITE = 0xFFFF;
- #define show endWrite
- #define clear() fillScreen(BLACK);
- auto display = Adafruit_SSD1331(
- CS_PIN,
- DC_PIN,
- SDA_PIN,
- SCL_PIN,
- RES_PIN
- );
- void setup()
- {
- Serial.begin(115200);
- Serial.println("Display SSD1331 1.32");
- Serial.println("Luton Research 2023");
- display.begin();
- display.clear();
- }
- void loop()
- {
- display.setTextColor(WHITE);
- display.setTextSize(2);
- display.setCursor(1, 1);
- display.println("Hello World");
- display.show();
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement