#include <Arduino.h>
#include <Adafruit_SSD1306.h>
// SSD1306 OLED Display
#define OLED_RESET -1
#define SCREEN_WIDTH 128
#define SCREEN_HEIGHT 32
#define SSD1306_I2C_ADDRESS 0x3C
Adafruit_SSD1306 display(SCREEN_WIDTH, SCREEN_HEIGHT, &Wire, OLED_RESET);
// PIN CONFIGURATIONS
#define OK_BUTTON_PIN 4
#define UP_BUTTON_PIN 19
#define DOWN_BUTTON_PIN 18
// FUNCTION PROTOTYPES
void setup() {
// Serial.begin(9600); /*ARDUINO*/ // Disable if you are using ESP32 Dev Board
Serial.begin(115200); /*ESP32*/ // Enable if you are using ESP32 Dev Board
// Set pin modes for the ultrasonic sensor
pinMode(OK_BUTTON_PIN, INPUT);
pinMode(UP_BUTTON_PIN, INPUT);
pinMode(DOWN_BUTTON_PIN, INPUT);
// Initialize the OLED display
if (!display.begin(SSD1306_SWITCHCAPVCC, SSD1306_I2C_ADDRESS)) {
Serial.println(F("SSD1306 allocation failed"));
for (;;); // Don't proceed, loop forever
}
display.clearDisplay();
display.setTextSize(2);
display.setTextColor(SSD1306_WHITE);
display.setCursor(20, 13);
display.print("PAKFONES");
display.display();
delay(1000);
display.clearDisplay();
}
void loop() {
// Loop code here
}