Дисплей OLED 128x64 I2C

Отображение текста, переменной и графики на дисплее OLED 128x64 I2C
#include <Wire.h>
#include "ASOLED.h"
long R = 0;

static const unsigned char PROGMEM Logo_BMP0[] =
  { 0x10, 0x10, 0xff, 0x01,
    B00000000,B00000000,B11000000,B01000000,B01000000,B01000000,B01000000,B01000000,
    B01000000,B01000000,B01000000,B01000000,B01000000,B01000000,B01000000,B11000000,
    B00011110,B00010010,B11110011,B10000000,B10000000,B10000000,B10000000,B10000000,
    B10000000,B10000000,B10000000,B10000000,B10000000,B10000000,B10000000,B11111111
   };
static const unsigned char PROGMEM Logo_BMP1[] =
  { 0x10, 0x10, 0xff, 0x01,
    B00000000,B00000000,B11000000,B01000000,B01000000,B01000000,B01000000,B01000000,
    B01000000,B11000000,B01000000,B11000000,B01000000,B11000000,B01000000,B11000000,
    B00011110,B00010010,B11110011,B10000000,B10000000,B10000000,B10000000,B10000000,
    B10000000,B11111111,B10000000,B11111111,B10000000,B11111111,B10000000,B11111111
   };
static const unsigned char PROGMEM Logo_BMP2[] =
  { 0x10, 0x10, 0xff, 0x01,
    B00000000,B00000000,B11000000,B11000000,B01000000,B11000000,B01000000,B11000000,
    B01000000,B11000000,B01000000,B11000000,B01000000,B11000000,B01000000,B11000000,
    B00011110,B00010010,B11110011,B11111111,B10000000,B11111111,B10000000,B11111111,
    B10000000,B11111111,B10000000,B11111111,B10000000,B11111111,B10000000,B11111111
   };

void setup() {
  LD.init();
  LD.clearDisplay();
  LD.printString_12x16("ArduBlock", 0, 0);
}

void loop() {
    R = R + 1;
    LD.printString_12x16("       ", 5, 2);
    LD.printString_12x16("", 5, 2);
    LD.printNumber((long)R);
    LD.drawBitmap(Logo_BMP0, 5, 4);
    delay(500);
    LD.drawBitmap(Logo_BMP1, 5, 4);
    delay(500);
    LD.drawBitmap(Logo_BMP2, 5, 4);
    delay(500);
}

Открыть пример: Online ArduBlock



Видеоурок: