Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
[Arduino source code for KC868-M16 V2]-OLED Show
#1
Code:
/*OLED SSD1306 Code for KC868-M16v2*/

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

U8G2_SSD1306_128X64_NONAME_F_SW_I2C u8g2(U8G2_R0,  5, 4, U8X8_PIN_NONE);//SCL IO5  SDA  IO4 
void page1() {

  u8g2.setFont(u8g2_font_timR12_tf);//Font 12
  u8g2.setCursor(0,15);
  u8g2.print("KC868-M16 V2");
}
void setup(){

  u8g2.setI2CAddress(0x3C*2);
  u8g2.begin();
  u8g2.enableUTF8Print();
}
void loop(){

  u8g2.firstPage();
  do
  {
    page1();
  }while(u8g2.nextPage());

}

Install ug82 library
   
   
Reply


Forum Jump:


Users browsing this thread: