Presentations
Templates
Features
Teams
Pricing
Log in
Sign up
Log in
Sign up
Menu
Horloge numérique
Module RTC
Installer la bibliothèque
"RTC by Makuna"
Branchement
RtcDS3231<TwoWire> clock(Wire);
clock
.Begin();
RtcDateTime time = RtcDateTime(__DATE__, __TIME__);
clock
.SetDateTime(time);
RtcDateTime now = clock
.GetDateTime();
now.Year()
now.Month()
now.Day()
now.Hour()
now.Minute()
now.Second()
int displayTime = now.Hour() * 100 + now.Minute();
Afficheur 7 segments
Câblage
SevSeg displayUnit;
Le nombres de chiffres
Les pins servent a la sélection d'un chiffres
Les pins servent a l'allumage des segments
byte numDigits = 4;
Tableau
byte digitPins[] = {2, 3, 4, 5};
byte segmentPins[] = {6, 7, 8, 9, 10, 11, 12, 13};
displayUnit.begin(COMMON_CATHODE, numDigits, digitPins, segmentPins);
Afficher le nombre
displayUnit.setNumber(
number
);
displayUnit.refreshDisplay();
Horloge numérique
By aghaniyassin
Made with Slides.com
Horloge numérique
1,378
aghaniyassin
More from
aghaniyassin