Initialize docs and hello display
This commit is contained in:
@@ -0,0 +1,18 @@
|
||||
#include <Arduino.h>
|
||||
#include <U8g2lib.h>
|
||||
#include <Wire.h>
|
||||
|
||||
// SH1106 128x64 OLED over hardware I2C, rotated 180 degrees for flipped mounting.
|
||||
U8G2_SH1106_128X64_NONAME_F_HW_I2C display(U8G2_R2, U8X8_PIN_NONE);
|
||||
|
||||
void setup() {
|
||||
display.begin();
|
||||
display.clearBuffer();
|
||||
display.setFont(u8g2_font_ncenB08_tr);
|
||||
display.drawStr(18, 32, "Hello, world!");
|
||||
display.sendBuffer();
|
||||
}
|
||||
|
||||
void loop() {
|
||||
delay(1000);
|
||||
}
|
||||
Reference in New Issue
Block a user