#include <Wire.h>
#include <Adafruit_GFX.h>
#include <Adafruit_SSD1306.h>
#define PANTALLA_ANCHO 128
#define PANTALLA_ALTO 64
#define OLED_RESET -1
Adafruit_SSD1306 display(PANTALLA_ANCHO, PANTALLA_ALTO, &Wire, OLED_RESET);
void setup() {
if (!display.begin(SSD1306_SWITCHCAPVCC, 0x3C)) {
for (;;);
}
display.clearDisplay();
/*
elegimos punto x, y y luego asignamos lo que se van a ampliar cada uno de ellos
*/
display.drawRect(20, 10, 6, 8, WHITE); // con drawRect hace un rectangulo normal
display.drawRect(80, 20, 10, 14, WHITE);
display.fillRect(30, 30, 20, 15, WHITE); // con fillRect lo hace relleno
display.drawRect(75, 15, 20, 30, WHITE);
display.display();
}
void loop() {
}