{"id":7813,"date":"2024-01-22T12:25:58","date_gmt":"2024-01-22T11:25:58","guid":{"rendered":"https:\/\/fablab21.fr\/?page_id=7813"},"modified":"2026-10-19T19:00:50","modified_gmt":"2026-10-19T17:00:50","slug":"lafficheur-a-segments","status":"publish","type":"page","link":"https:\/\/www.association-ore.fr\/fr\/tutos\/tutos-arduino\/lafficheur-a-segments\/","title":{"rendered":"L&rsquo;afficheur \u00e0 segments"},"content":{"rendered":"<p>Le module Arduino TM1637 est un afficheur \u00e0 sept segments \u00e0 LED avec une interface simple \u00e0 quatre broches, permettant l&rsquo;affichage de chiffres et de caract\u00e8res alphanum\u00e9riques de mani\u00e8re efficace et facile \u00e0 int\u00e9grer dans des projets \u00e9lectroniques<\/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\/module-d-affichage-led-tm1637-pour-arduino-4-chiffres-7-segments-056-pouces.jpg\" alt=\"\"\/><\/figure>\n\n\n\n<h2 class=\"wp-block-heading\">Configuration<\/h2>\n\n\n<p>Installer la library TM1637<\/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-5.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-3.png\" alt=\"\"\/><\/figure>\n\n\n<p>D\u00e9finir les broches branch\u00e9es<\/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-3.png\" alt=\"\"\/><\/figure>\n\n\n<p>Cr\u00e9er l&rsquo;objet TM1637Display<\/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-3.png\" alt=\"\"\/><\/figure>\n\n\n<p>Configurer la luminosit\u00e9 (de 0 \u00e0 7)<\/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-3.png\" alt=\"\"\/><\/figure>\n\n\n\n<h2 class=\"wp-block-heading\">Afficher des nombres<\/h2>\n\n\n<p>Afficher un nombre \u00e0 4 chiffres<\/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\/image_2024-01-23_114256868.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\/6-3.png\" alt=\"\"\/><\/figure>\n\n\n<p>Ajouter un d\u00e9lai de 1 seconde et effacer l&rsquo;affichage<\/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.png\" alt=\"\"\/><\/figure>\n\n\n<p>Afficher un nombre \u00e0 3 chiffres<\/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-4.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\/8.png\" alt=\"\"\/><\/figure>\n\n\n<p>Afficher 3 chiffres en compl\u00e9tant avec des 0<\/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-4.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.png\" alt=\"\"\/><\/figure>\n\n\n<p>Afficher 1 chiffre \u00e0 l&#8217;emplacement 0 (1er \u00e0 gauche, le compte commence \u00e0 0)<\/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-5.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.png\" alt=\"\"\/><\/figure>\n\n\n<p>Afficher 1 chiffre \u00e0 l&#8217;emplacement 1, puis 2, puis 3<\/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-4.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\/6-4.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\/7-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\/11.png\" alt=\"\"\/><\/figure>\n\n\n<p>Afficher 2 chiffre \u00e0 l&#8217;emplacement 1<\/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-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\/12.png\" alt=\"\"\/><\/figure>\n\n\n\n<h2 class=\"wp-block-heading\">Afficher des segments<\/h2>\n\n\n<p>Chaque segment peut \u00eatre contr\u00f4l\u00e9 individuellement, chacun ayant une lettre attribu\u00e9e<\/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\/1200px-7_segment_display_labeled.svg.png\" alt=\"\"\/><\/figure>\n\n\n<p>D\u00e9clarer un tableau de 4 nombres (sur 8 bits)<\/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.png\" alt=\"\"\/><\/figure>\n\n\n<p>Configurer l&rsquo;allumage du segment A<\/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.png\" alt=\"\"\/><\/figure>\n\n\n<p>Allumer les 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\/9-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\/15.png\" alt=\"\"\/><\/figure>\n\n\n<p>Configurer le segment B \u00e0 l&#8217;emplacement 1<\/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\/10-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\/16.png\" alt=\"\"\/><\/figure>\n\n\n<p>Configurer le segment A, B et C \u00e0 l&#8217;emplacement 2<\/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-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\/17.png\" alt=\"\"\/><\/figure>\n\n\n<p>Cr\u00e9er un segment H pour le point<\/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\/18.png\" alt=\"\"\/><\/figure>\n\n\n<p>Configurer le segment H (le point) \u00e0 l&#8217;emplacement 3<\/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-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\/19.png\" alt=\"\"\/><\/figure>\n\n\n\n<h2 class=\"wp-block-heading\">Afficher l&#039;heure<\/h2>\n\n\n<p>R\u00e9cup\u00e9rer l&rsquo;heure (au moment de la compilation)\u00a0<\/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\/20.png\" alt=\"\"\/><\/figure>\n\n\n<p>L&rsquo;heure r\u00e9cup\u00e9r\u00e9e est dans ce format :<\/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\/time.png\" alt=\"\"\/><\/figure>\n\n\n<p>Formater et r\u00e9cup\u00e9rer les heures (caract\u00e8res de 0 inclus \u00e0 2 exclus)<\/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\/21.png\" alt=\"\"\/><\/figure>\n\n\n<p>Formater et r\u00e9cup\u00e9rer les minutes (caract\u00e8res de 3 inclus \u00e0 5 exclus)<\/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\/22.png\" alt=\"\"\/><\/figure>\n\n\n<p>Afficher les heures et un point (0b01000000, le 1 est l&#8217;emplacement du point)<\/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\/23.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\/24.png\" alt=\"\"\/><\/figure>\n","protected":false},"excerpt":{"rendered":"<p>Le module Arduino TM1637 est un afficheur \u00e0 sept segments \u00e0 LED avec une interface simple \u00e0 quatre broches, permettant l&rsquo;affichage de chiffres et [&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-7813","page","type-page","status-publish","hentry"],"_links":{"self":[{"href":"https:\/\/www.association-ore.fr\/fr\/wp-json\/wp\/v2\/pages\/7813","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=7813"}],"version-history":[{"count":1,"href":"https:\/\/www.association-ore.fr\/fr\/wp-json\/wp\/v2\/pages\/7813\/revisions"}],"predecessor-version":[{"id":11486,"href":"https:\/\/www.association-ore.fr\/fr\/wp-json\/wp\/v2\/pages\/7813\/revisions\/11486"}],"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=7813"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}