#include <Adafruit_GFX.h>
#include <Adafruit_SSD1306.h>
#define SCREEN_I2C_ADDR 0x3C // or 0x3C
#define SCREEN_WIDTH 128 // OLED display width, in pixels
#define SCREEN_HEIGHT 32 // OLED display height, in pixels
#define OLED_RST_PIN -1 // Reset pin (-1 if not available)
Adafruit_SSD1306 display(SCREEN_WIDTH, SCREEN_HEIGHT, &Wire, OLED_RST_PIN);
//initialize 3 buttons
#define leftButton 6
#define selectButton 5
#define rightButton 4
void setup() {
pinMode(leftButton, INPUT);
pinMode(selectButton, INPUT);
pinMode(rightButton, INPUT);
// put your setup code here, to run once:
Serial.begin(115200);
display.begin(SSD1306_SWITCHCAPVCC, SCREEN_I2C_ADDR);
display.display();
display.clearDisplay();
delay(100);
display.setTextSize(2); // Normal 1:1 pixel scale
display.setTextColor(SSD1306_WHITE); // Draw white text
display.setCursor(36, 8); // Start at top-left corner
display.cp437(true); // Use full 256 char 'Code Page 437' font
display.write("READY");
display.display();
}
void loop() {
Serial.println(digitalRead(rightButton));
Serial.println(digitalRead(selectButton));
Serial.println(digitalRead(leftButton));
delay(200);
}