#include "U8g2lib.h"
#include "Joystick.h"
// 8 scl
// 7 sda
// U8GLIB_SSD1306_128X64 u8g(U8G_I2C_OPT_DEV_0 | U8G_I2C_OPT_NO_ACK | U8G_I2C_OPT_FAST); // Fast I2C / TWI
U8G2_SSD1306_128X64_NONAME_1_HW_I2C u8g2(U8G2_R1, /* reset=*/ U8X8_PIN_NONE);
// Create Joystick
// Joystick_ Joystick;
const int pinToButtonMap = A0;
void setup() {
u8g2.begin();
// put your setup code here, to run once:
u8g2.clearBuffer();
u8g2.setFontMode(1);
u8g2.setFont(u8g2_font_profont10_tr);
pinMode(A0, INPUT);
//Joystick.begin();
}
void loop() {
u8g2.firstPage();
int pot = analogRead(A0);
int mapped = map(pot,0,1023,0,255);
do {
// u8g2.drawXBMP(0, 0, 128, 64, epd_bitmap_handbremserl);
u8g2.setCursor(0,10);
u8g2.print(F("DEINEMAMA: "));
u8g2.setCursor(50,10);
u8g2.print(mapped);
} while ( u8g2.nextPage() );
// rebuild the picture after some delay
delay(50);
}