ESP32 096 OLED

From
Jump to: navigation, search

retour


#include <Arduino.h>
#include <Wire.h>
#include <U8g2lib.h>

U8G2_SSD1306_128X64_NONAME_F_SW_I2C 
u8g2(U8G2_R0, /* clock=*/ 22, /* data=*/ 21, /* reset=*/ U8X8_PIN_NONE);   // All Boards without Reset of the Display

void setup() {
  // put your setup code here, to run once:

  u8g2.begin();
}

void loop() {
  // put your main code here, to run repeatedly:

  u8g2.clearBuffer();
  u8g2.setFont(u8g2_font_7x14B_tr);
  u8g2.drawStr(0,10,"Hello,ideaspark");
  u8g2.drawStr(0,30,"Hello,Seeed");
  u8g2.drawStr(0,50,"Hello,Studio");
  u8g2.drawStr(0,70,"Hello,Word");
  u8g2.sendBuffer();
  delay(1000);

}