//================= Example7_2 ====================
#include <ESP32Servo.h>
Servo myservo;  
#include <Wire.h>
#include <Adafruit_GFX.h>
#include <Adafruit_SH110X.h>
#define i2c_Address 0x3c 
#define SCREEN_WIDTH 128 
#define SCREEN_HEIGHT 64 
#define OLED_RESET -1   
Adafruit_SH1106G display = Adafruit_SH1106G(SCREEN_WIDTH, SCREEN_HEIGHT,&Wire, OLED_RESET);
#define analogPin 34
void setup() {
  initOled();
  myservo.attach(18); 
  functionsForPrintingAmessage(38,10,"Servo");
}
void loop() {
  int adcValue=analogRead(analogPin);
  int servoPosition = map(adcValue, 0,4096, 0,180);
  myservo.write(servoPosition);
  functionsForPrintingData(45 ,40, servoPosition); 
  delay(20);
 }
 //=================================================
