Arduino Uno – 4 Digit Display

Neli-numeroinen näyttö, joka voi esittää esimerkiksi kellonaikaa.


Lähdekoodi:

Esimerkkikoodi löytyy GitHubista: https://github.com/PyhaMarkus/4_digit_display

#include "SevSeg.h"
SevSeg sevseg;

void setup(){
byte numDigits = 4;
byte digitPins[] = {13, 12, 11, 10};
byte segmentPins[] = {9, 2, 3, 5, 6, 8, 7, 4};

bool resistorsOnSegments = true; 
bool updateWithDelaysIn = true;
byte hardwareConfig = COMMON_CATHODE; 
sevseg.begin(hardwareConfig, numDigits, digitPins, segmentPins, resistorsOnSegments);
sevseg.setBrightness(100);
}

void loop(){
// Display the numbers 1234.
sevseg.setNumber(1234);
sevseg.refreshDisplay(); 
}

Käytetyt osat:

KappalemääräOsan nimi
1Arduino Uno Rev3
14 Digit 7 Segment Display
410K ohm resistor
1Large Breadboard
A lotJumper Wire


Käytetyt kirjastot:

SevSeg.h

Leave a Comment

Your email address will not be published. Required fields are marked *

Scroll to Top
Scroll to Top