#include <U8g2lib.h>

#ifdef U8X8_HAVE_HW_SPI
#include <SPI.h>
#endif
#ifdef U8X8_HAVE_HW_I2C
#include <Wire.h>
#endif


U8G2_SSD1306_128X64_NONAME_F_HW_I2C display1(U8G2_R0, 5,4,U8X8_PIN_NONE);
U8G2_SSD1306_128X64_NONAME_F_HW_I2C display2(U8G2_R0, 5,4,U8X8_PIN_NONE);


void setup(void) {
    display2.setI2CAddress(0x7A);
  display2.begin();
  display2.setFont(u8g2_font_ncenB08_tr); // choose a suitable font
  display2.clearDisplay();
    display1.setI2CAddress(0x78);
  display1.begin();
  display1.setFont(u8g2_font_ncenB08_tr); // choose a suitable font
  display1.clearDisplay();
  delay(500);  
}

void loop(void) {
  display1.clearDisplay();
  display1.clearBuffer();          // clear the internal memory
  display1.drawStr(10,20,"Hello");  // write something to the internal memory
  display1.sendBuffer();          // transfer internal memory to the display

  
  display2.clearDisplay();
  display2.clearBuffer();          // clear the internal memory
  display2.drawStr(20,20,"World!");  // write something to the internal memory
  display2.sendBuffer();          // transfer internal memory to the display
  delay(1000);  
	}