/* * Simple code to test the display function and electrical connections. */ #include //Instantiates a seven segment object SevSeg sevseg; void setup() { byte numDigits = 4; byte digitPins[] = {14, 17, 18, 12}; byte segmentPins[] = {15, 19, 7, 9, 6, 16, 8}; bool resistorsOnSegments = false; byte hardwareConfig = COMMON_CATHODE; bool updateWithDelays = false; bool leadingZeros = false; bool disableDecPoint = true; sevseg.begin(hardwareConfig, numDigits, digitPins, segmentPins, resistorsOnSegments, updateWithDelays, leadingZeros, disableDecPoint); } void loop() { sevseg.setNumber(555,0); // Displays '3.141' sevseg.refreshDisplay(); sevseg.setBrightness(100); }