#include "SevSeg.h"
SevSeg sevseg;
int poc;
int poten;
int potenmap;
void setup() {
// put your setup code here, to run once:
Serial.begin(9600);
byte numDigits = 4;
byte digitPins[] = {2, 3, 4, 5};
byte segmentPins[] = {6, 7, 8, 9, 10, 11, 12 ,13};
bool resistorsOnSegments = false; // 'false' means resistors are on digit pins
byte hardwareConfig = COMMON_ANODE; // See README.md for options
bool updateWithDelays = false; // Default 'false' is Recommended
bool leadingZeros = false; // Use 'true' if you'd like to keep the leading zeros
bool disableDecPoint = false; // Use 'true' if your decimal point doesn't exist or isn't connected
sevseg.begin(hardwareConfig, numDigits, digitPins, segmentPins, resistorsOnSegments,
updateWithDelays, leadingZeros, disableDecPoint);
sevseg.setBrightness(90);
int poc = 0;
}
void loop() {
// put your main code here, to run repeatedly:
poten = analogRead(A0);
potenmap = (map(poten, 0, 1023, 0, 1000));
Serial.println(potenmap);
sevseg.setNumber(potenmap);
sevseg.refreshDisplay();
}