#include <U8g2lib.h>
#include <Wire.h>
#include <SPI.h>
#include <qrcode.h>
// U8G2 Constructor for SH1122 256x64 OLED. I took it from the website
U8G2_SH1122_256X64_F_HW_I2C u8g2(U8G2_R0, /* reset=*/ U8X8_PIN_NONE);
void displayQRCode(String text) {
u8g2.clearBuffer();
u8g2.setCursor(0, 20);
u8g2.print("QR Code:");
esp_qrcode_generate("This is a test")
u8g2.sendBuffer();
}
void setup() {
// Initialize the display
u8g2.begin();
// Set font and size
u8g2.setFont(u8g2_font_ncenB14_tr);
displayQRCode("https://www.youtube.com/watch?v=dQw4w9WgXcQ");
}
void loop() {
}