// 参照: https://wokwi.com/projects/390259303458015233
#include "U8g2lib.h"
// U8G2_R0: 回転なし, 横向き
// 参照: https://github.com/olikraus/u8g2/wiki/u8g2reference#carduino-example
U8G2_SH1107_128X128_1_HW_I2C sh1107(U8G2_R0);
const uint8_t TEXT_X = 50;
const uint8_t TEXT_Y = 70;
void setup() {
sh1107.begin();
sh1107.setContrast(255);
}
void loop() {
sh1107.firstPage();
sh1107.setDrawColor(1);
sh1107.setFont(u8g2_font_6x10_tr);
sh1107.drawStr(TEXT_X, TEXT_Y, "sh1107");
while(sh1107.nextPage()) {
sh1107.drawStr(TEXT_X, TEXT_Y, "sh1107");
}
}
Loading
grove-oled-sh1107
grove-oled-sh1107