#include <TM1637Display.h>
#include"ESP32Servo.h"
#define CLK 22 // The ESP32 pin GPIO22 connected to CLK
#define DIO 23 // The ESP32 pin GPIO23 connected to DIO
TM1637Display display = TM1637Display(CLK, DIO);
Servo myservo;
int pos=0;
void setup() {
display.clear();
display.setBrightness(7); // set the brightness to 7 (0:dimmest, 7:brightest)
myservo.attach(18);
}
void loop() {
for(pos=0;pos<=179;pos+=1){
myservo.write(pos);
display.showNumberDec(pos);
delay(100);
}
}