#include<Wire.h>
//#include<SPI.h>
//#include<Adafruit_SH1106.h>
//Adafruit_SH1106 OLED(-1);
#include<Adafruit_GFX.h>//Wokwi
#include<Adafruit_SSD1306.h>//Wokwi
Adafruit_SSD1306 OLED(-1);//Wokwi
 
int x;
float v;
void setup() {
//  OLED.begin(SH1106_SWITCHCAPVCC,0x3c);
  OLED.begin(SSD1306_SWITCHCAPVCC,0x3c);//Wokwi
}
 
void loop() {
  // put your main code here, to run repeatedly:
  x = analogRead(A0);
  v = x*5/1023.0;
  OLED.clearDisplay();
  OLED.setTextColor(WHITE,BLACK);
  OLED.setCursor(0,0);
  OLED.setTextSize(1);
  OLED.println("NIDA");
  OLED.print("65301280031");
  OLED.setCursor(0,20);
  OLED.setTextSize(2);
  OLED.print("X = ");
  OLED.println(x);
  OLED.print("V = ");
  OLED.println(v);
  delay(250);
  OLED.display();
}