{"id":7977,"date":"2024-01-27T09:17:22","date_gmt":"2024-01-27T08:17:22","guid":{"rendered":"https:\/\/fablab21.fr\/?page_id=7977"},"modified":"2026-10-19T19:00:50","modified_gmt":"2026-10-19T17:00:50","slug":"lhorloge-rtc","status":"publish","type":"page","link":"https:\/\/www.association-ore.fr\/fr\/tutos\/tutos-arduino\/lhorloge-rtc\/","title":{"rendered":"L&rsquo;horloge RTC"},"content":{"rendered":"<p>Une horloge RTC (Real Time Clock) est un module \u00e9lectronique int\u00e9grant une horloge en temps r\u00e9el, permettant \u00e0 un microcontr\u00f4leur Arduino de suivre pr\u00e9cis\u00e9ment l&rsquo;heure et la date, m\u00eame en l&rsquo;absence d&rsquo;alimentation externe.<\/p>\n\n\n<figure class=\"wp-block-image size-full\"><img decoding=\"async\" src=\"https:\/\/www.association-ore.fr\/fr\/wp-content\/uploads\/2024\/01\/b8e7735b3aa8fada2a4a98e5ae8db5e3db656762.jpeg\" alt=\"\"\/><\/figure>\n\n\n\n<h2 class=\"wp-block-heading\">Configuration<\/h2>\n\n\n<p>Installer la library RTClib<\/p>\n\n\n<figure class=\"wp-block-image size-full\"><img decoding=\"async\" src=\"https:\/\/www.association-ore.fr\/fr\/wp-content\/uploads\/2024\/01\/1-6.png\" alt=\"\"\/><\/figure>\n\n\n<p>Inclure la library<\/p>\n\n\n<figure class=\"wp-block-image size-full\"><img decoding=\"async\" src=\"https:\/\/www.association-ore.fr\/fr\/wp-content\/uploads\/2024\/01\/2-5.png\" alt=\"\"\/><\/figure>\n\n\n<p>Cr\u00e9er l&rsquo;objet RTC_DS3231<\/p>\n\n\n<figure class=\"wp-block-image size-full\"><img decoding=\"async\" src=\"https:\/\/www.association-ore.fr\/fr\/wp-content\/uploads\/2024\/01\/3-5.png\" alt=\"\"\/><\/figure>\n\n\n<p>D\u00e9marrer la communication avec le module RTC<\/p>\n\n\n<figure class=\"wp-block-image size-full\"><img decoding=\"async\" src=\"https:\/\/www.association-ore.fr\/fr\/wp-content\/uploads\/2024\/01\/4-6.png\" alt=\"\"\/><\/figure>\n\n\n<p>D\u00e9tecter si le module a perdu l&rsquo;alimentation<\/p>\n\n\n<figure class=\"wp-block-image size-full\"><img decoding=\"async\" src=\"https:\/\/www.association-ore.fr\/fr\/wp-content\/uploads\/2024\/01\/5-5.png\" alt=\"\"\/><\/figure>\n\n\n<p>Ajuster l&rsquo;heure si l&rsquo;alimentation a \u00e9t\u00e9 perdue (\u00e0\u00a0la date et l&rsquo;heure actuelles du compilateur Arduino)<\/p>\n\n\n<figure class=\"wp-block-image size-full\"><img decoding=\"async\" src=\"https:\/\/www.association-ore.fr\/fr\/wp-content\/uploads\/2024\/01\/6-5.png\" alt=\"\"\/><\/figure>\n\n\n\n<h2 class=\"wp-block-heading\">Afficher l&#039;heure<\/h2>\n\n\n<p>Configurer l&rsquo;afficheur \u00e0 segments<\/p>\n\n\n<figure class=\"wp-block-image size-full\"><img decoding=\"async\" src=\"https:\/\/www.association-ore.fr\/fr\/wp-content\/uploads\/2024\/01\/7-2.png\" alt=\"\"\/><\/figure>\n\n\n<p>R\u00e9cup\u00e9rer l&rsquo;heure actuelle<\/p>\n\n\n<figure class=\"wp-block-image size-full\"><img decoding=\"async\" src=\"https:\/\/www.association-ore.fr\/fr\/wp-content\/uploads\/2024\/01\/8-2.png\" alt=\"\"\/><\/figure>\n\n\n<p>Afficher les heures<\/p>\n\n\n<figure class=\"wp-block-image size-full\"><img decoding=\"async\" src=\"https:\/\/www.association-ore.fr\/fr\/wp-content\/uploads\/2024\/01\/14-1-1.png\" alt=\"\"\/><\/figure>\n\n\n\n<figure class=\"wp-block-image size-full\"><img decoding=\"async\" src=\"https:\/\/www.association-ore.fr\/fr\/wp-content\/uploads\/2024\/01\/9-2.png\" alt=\"\"\/><\/figure>\n\n\n<p>Afficher les minutes<\/p>\n\n\n<figure class=\"wp-block-image size-full\"><img decoding=\"async\" src=\"https:\/\/www.association-ore.fr\/fr\/wp-content\/uploads\/2024\/01\/13-1-1.png\" alt=\"\"\/><\/figure>\n\n\n\n<figure class=\"wp-block-image size-full\"><img decoding=\"async\" src=\"https:\/\/www.association-ore.fr\/fr\/wp-content\/uploads\/2024\/01\/10-2.png\" alt=\"\"\/><\/figure>\n\n\n<p>Ajouter un d\u00e9lai de 5 secondes<\/p>\n\n\n<figure class=\"wp-block-image size-full\"><img decoding=\"async\" src=\"https:\/\/www.association-ore.fr\/fr\/wp-content\/uploads\/2024\/01\/11-2.png\" alt=\"\"\/><\/figure>\n\n\n\n<h2 class=\"wp-block-heading\">Afficher la temp\u00e9rature<\/h2>\n\n\n<p>Effacer l&rsquo;heure<\/p>\n\n\n<figure class=\"wp-block-image size-full\"><img decoding=\"async\" src=\"https:\/\/www.association-ore.fr\/fr\/wp-content\/uploads\/2024\/01\/12-2.png\" alt=\"\"\/><\/figure>\n\n\n<p>Afficher le C de Celsius<\/p>\n\n\n<figure class=\"wp-block-image size-full\"><img decoding=\"async\" src=\"https:\/\/www.association-ore.fr\/fr\/wp-content\/uploads\/2024\/01\/celsius.png\" alt=\"\"\/><\/figure>\n\n\n\n<figure class=\"wp-block-image size-full\"><img decoding=\"async\" src=\"https:\/\/www.association-ore.fr\/fr\/wp-content\/uploads\/2024\/01\/13-2.png\" alt=\"\"\/><\/figure>\n\n\n<p>R\u00e9cup\u00e9rer la temp\u00e9rature<\/p>\n\n\n<figure class=\"wp-block-image size-full\"><img decoding=\"async\" src=\"https:\/\/www.association-ore.fr\/fr\/wp-content\/uploads\/2024\/01\/14-2.png\" alt=\"\"\/><\/figure>\n\n\n<p>Afficher la temp\u00e9rature<\/p>\n\n\n<figure class=\"wp-block-image size-full\"><img decoding=\"async\" src=\"https:\/\/www.association-ore.fr\/fr\/wp-content\/uploads\/2024\/01\/temp.png\" alt=\"\"\/><\/figure>\n\n\n\n<figure class=\"wp-block-image size-full\"><img decoding=\"async\" src=\"https:\/\/www.association-ore.fr\/fr\/wp-content\/uploads\/2024\/01\/15-1.png\" alt=\"\"\/><\/figure>\n\n\n<p>Ajouter un d\u00e9lai de 5 secondes et effacer la temp\u00e9rature<\/p>\n\n\n<figure class=\"wp-block-image size-full\"><img decoding=\"async\" src=\"https:\/\/www.association-ore.fr\/fr\/wp-content\/uploads\/2024\/01\/16-1-1.png\" alt=\"\"\/><\/figure>\n","protected":false},"excerpt":{"rendered":"<p>Une horloge RTC (Real Time Clock) est un module \u00e9lectronique int\u00e9grant une horloge en temps r\u00e9el, permettant \u00e0 un microcontr\u00f4leur Arduino de suivre pr\u00e9cis\u00e9ment [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":0,"parent":6311,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"page-tutoriel","meta":{"footnotes":""},"class_list":["post-7977","page","type-page","status-publish","hentry"],"_links":{"self":[{"href":"https:\/\/www.association-ore.fr\/fr\/wp-json\/wp\/v2\/pages\/7977","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.association-ore.fr\/fr\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/www.association-ore.fr\/fr\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/www.association-ore.fr\/fr\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.association-ore.fr\/fr\/wp-json\/wp\/v2\/comments?post=7977"}],"version-history":[{"count":1,"href":"https:\/\/www.association-ore.fr\/fr\/wp-json\/wp\/v2\/pages\/7977\/revisions"}],"predecessor-version":[{"id":11487,"href":"https:\/\/www.association-ore.fr\/fr\/wp-json\/wp\/v2\/pages\/7977\/revisions\/11487"}],"up":[{"embeddable":true,"href":"https:\/\/www.association-ore.fr\/fr\/wp-json\/wp\/v2\/pages\/6311"}],"wp:attachment":[{"href":"https:\/\/www.association-ore.fr\/fr\/wp-json\/wp\/v2\/media?parent=7977"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}