#include <Wire.h>
#include <SPI.h>
#include <Adafruit_GFX.h>
#include <Adafruit_SSD1306.h>
#define SCREEN_WIDTH 128
#define SCREEN_HEIGHT 64
#define OLED_RESET 4
Adafruit_SSD1306 display(SCREEN_WIDTH,SCREEN_HEIGHT,&Wire,OLED_RESET);
void setup() {
// put your setup code here, to run once:
Serial.begin(115200);
Serial.println("Hello, ESP32!");
if(!display.begin(SSD1306_SWITCHCAPVCC,0x3C)){
Serial.println(F("SSD1306 allocation failed"));
for(;;);
}
}
void loop() {
// put your main code here, to run repeatedly:
delay(10); // this speeds up the simulation
display.clearDisplay();
display.drawCircle(50,30,30,WHITE);
display.display();
delay(1000);
}