Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
[arduino code examples for A6v3]-08 Print TEXT on SSD1306 OLED displayer
#1
Code:
/*OLED SSD1306 Code for KC868-A6v3*/

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

U8G2_SSD1306_128X64_NONAME_F_SW_I2C u8g2(U8G2_R0,  11, 12, U8X8_PIN_NONE);//SCL IO11  SDA  IO12   

void page1() {
  u8g2.setFont(u8g2_font_timR18_tf);// Font 18
  u8g2.setFontPosTop();
  u8g2.setCursor(5,0);
  u8g2.print("KINCONY");
  u8g2.setFont(u8g2_font_timR12_tf);//Font 12
  u8g2.setCursor(0,40);
  u8g2.print("www.kincony.com");
}
void setup(){

  u8g2.setI2CAddress(0x3C*2);
  u8g2.begin();
  u8g2.enableUTF8Print();
}
void loop(){
  u8g2.firstPage();
  do
  {
    page1();
  }while(u8g2.nextPage());

}
arduino ino file download:
.zip   oled.zip (Size: 500 bytes / Downloads: 14)
BIN file (you can use esp32 download tool download to ESP32-S3 with address 0x0 then directly to use) download:
.zip   oled.ino.merged.zip (Size: 201.21 KB / Downloads: 15)
Reply


Forum Jump:


Users browsing this thread:
1 Guest(s)