#include <Arduino.h>
#include <Wire.h>
#include <U8g2lib.h>
// Hardware I2C SSD1306, 128x64
U8G2_SSD1306_128X64_NONAME_F_HW_I2C oled(U8G2_R0, U8X8_PIN_NONE);
void setup() {
// Explicitly use the Wokwi STM32 Nucleo-C031C6 default I2C pins
Wire.setSDA(14); // D14
Wire.setSCL(15); // D15
Wire.begin();
oled.begin();
oled.clearBuffer();
oled.setFont(u8g2_font_ncenB08_tr);
oled.drawStr(10, 20, "VECTOR OLED TEST");
oled.setFont(u8g2_font_6x12_tr);
oled.drawStr(10, 40, "Hello from Wokwi");
oled.drawStr(22, 56, "NUCLEO-C031C6");
oled.sendBuffer();
}
void loop() {
// keep displayed text stable
}