#include <SevSeg.h>
SevSeg seven;
int slide = A0;
void setup() {
pinMode(slide,INPUT );
Serial.begin(115200);
byte hardware = COMMON_ANODE;
byte numDigit = 4;
byte digit[] = {2,3,4,5};
byte seg[] = {6,7,8,9,10,11,12};
bool resistor = false;
bool updateDelay = false;
bool leadZero = false;
bool disable = false;
seven.begin(hardware,numDigit,digit,seg,resistor,updateDelay,leadZero,disable);
seven.setBrightness(90);
// put your setup code here, to run once:
}
void loop() {
slide = analogRead(A0);
slide = (map(slide, 0,1023,0,1000));
int rea = analogRead(slide);
Serial.println(slide );
seven.setNumber(slide);
seven.refreshDisplay();
// put your main code here, to run repeatedly:
}