#include <Wire.h>
#include <Adafruit_GFX.h>
#include <Adafruit_SSD1306.h>
#define ANCHO 128
#define ALTO 64
#define OLED_RESET -1
Adafruit_SSD1306 display(ANCHO, ALTO, &Wire, OLED_RESET);
String mensajes[] = {
"Hoy te vi, las ganas siguen ahi",
"...",
"oh, uoh, ah Baby",
"Suena tu cancion y tu no estus aqui a mi la,o",
"...",
"Yo se que no debo, que te pienso demasia,o",
"Que rico esos dias cuando estabamo traga,o",
"...",
"Tu y yo somo fuego cuando estamo emborracha,o",
"Suena tu cancion y tu no estas aqui a mi la,o",
"Yo se que no debo, que te pienso demasia,o",
"...",
"Quererte es tan facil y, a la vez, tan complica,o",
"Mirando al telefono, pero no me has llama,o"
};
int totalMensajes = 14;
void setup() {
Serial.begin(115200);
Wire.begin(21, 22);
if (!display.begin(SSD1306_SWITCHCAPVCC, 0x3C)) {
Serial.println("Error OLED");
while (true);
}
display.clearDisplay();
display.setTextColor(SSD1306_WHITE);
display.display();
}
void loop() {
for (int i = 0; i < totalMensajes; i++) {
display.clearDisplay();
// Titulo
display.setTextSize(1);
display.setCursor(25, 5);
display.println("BBY WOW");
display.drawLine(0, 17, 128, 17, SSD1306_WHITE);
// Mensaje
display.setTextSize(1);
display.setCursor(5, 29);
display.println(mensajes[i]);
display.display();
delay(2500);
}
}
Loading
esp32-devkit-c-v4
esp32-devkit-c-v4
Loading
ssd1306
ssd1306