#include <Wire.h>
#include <Adafruit_GFX.h>
#include <Adafruit_SSD1306.h>
void setup() {
#define OLED_WIDTH 128 // OLED display width, in pixels
#define OLED_HEIGHT 64 // O
Adafruit_SSD1306 oled(OLED_WIDTH, OLED_HEIGHT, &Wire, -1);
// initialize OLED display with I2C address 0x3C
if (!oled.begin(SSD1306_SWITCHCAPVCC, 0x3C)) {
Serial.println(F("failed to start SSD1306 OLED"));
while (1);
}else{
delay(2000); // wait two seconds for initializing
oled.clearDisplay(); // clear display
oled.setTextSize(1); // set text size
oled.setTextColor(WHITE); // set text color
oled.setCursor(0, 10); // set position to display
oled.println("esp32io.com"); // set text
oled.display();
}
pinMode(13, OUTPUT);
Serial.begin(115200);
Serial.println("Hello Arduino Nano ESP32!");
}
void loop() {
digitalWrite(13, HIGH);
delay(500);
digitalWrite(, LOW);
delay(500);
}
Loading
arduino-nano-esp32
arduino-nano-esp32