Semester assignment for the course "Microprocessors and Peripherals" of THMMY in AUTH university.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

28 lines
697 B

6 years ago
/*
* Simple code to test the display function and electrical connections.
*/
#include <SevSeg.h>
//Instantiates a seven segment object
SevSeg sevseg;
void setup() {
byte numDigits = 4;
byte digitPins[] = {14, 17, 18, 12};
byte segmentPins[] = {15, 19, 7, 8, 9, 16, 6, 13};
6 years ago
bool resistorsOnSegments = false;
byte hardwareConfig = COMMON_CATHODE;
bool updateWithDelays = false;
bool leadingZeros = false;
bool disableDecPoint = false;
6 years ago
sevseg.begin(hardwareConfig, numDigits, digitPins, segmentPins, resistorsOnSegments,
updateWithDelays, leadingZeros, disableDecPoint);
}
void loop() {
sevseg.setNumber(567, 1);
6 years ago
sevseg.refreshDisplay();
sevseg.setBrightness(120);
6 years ago
}