{"id":4095,"date":"2025-09-16T08:45:37","date_gmt":"2025-09-16T07:45:37","guid":{"rendered":"https:\/\/workboot.fr\/ciela\/?page_id=4095"},"modified":"2025-09-22T14:43:39","modified_gmt":"2025-09-22T13:43:39","slug":"le-convertisseur-analogique-numerique","status":"publish","type":"page","link":"https:\/\/workboot.fr\/ciela\/le-convertisseur-analogique-numerique\/","title":{"rendered":"Le convertisseur  Analogique Num\u00e9rique"},"content":{"rendered":"\n<h2 class=\"wp-block-heading\">Exemple simple avec un potentiom\u00e8tre sur A0,  AREF non connect\u00e9 donc a 5V par d\u00e9faut<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Dans cet exemple on peut faire varier la tension du potentiom\u00e8tre de 0 \u00e0 5V<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><a href=\"https:\/\/wokwi.com\/projects\/442447726975929345\">https:\/\/wokwi.com\/projects\/442447726975929345<\/a><\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-large\"><a href=\"https:\/\/workboot.fr\/ciela\/wp-content\/uploads\/2025\/09\/CAN_POT.png\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"476\" src=\"https:\/\/workboot.fr\/ciela\/wp-content\/uploads\/2025\/09\/CAN_POT-1024x476.png\" alt=\"\" class=\"wp-image-4185\" srcset=\"https:\/\/workboot.fr\/ciela\/wp-content\/uploads\/2025\/09\/CAN_POT-1024x476.png 1024w, https:\/\/workboot.fr\/ciela\/wp-content\/uploads\/2025\/09\/CAN_POT-300x139.png 300w, https:\/\/workboot.fr\/ciela\/wp-content\/uploads\/2025\/09\/CAN_POT-768x357.png 768w, https:\/\/workboot.fr\/ciela\/wp-content\/uploads\/2025\/09\/CAN_POT.png 1278w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/a><\/figure>\n<\/div>\n\n\n<h2 class=\"wp-block-heading\">Proposer un code qui va afficher sur le terminal s\u00e9rie la tension en Volt, on va r\u00e9aliser un voltm\u00e8tre num\u00e9rique<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">utiliser q , le qantum du convertisseur avec la macro commande suivante:<\/p>\n\n\n<p>#define q 5.0\/1023<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Code exemple donn\u00e9 sur l&rsquo;IDE Arduino<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Expliquer ce que fait ce code<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"c\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">int sensorPin = A0;    \/\/ select the input pin for the potentiometer\nint ledPin = 13;      \/\/ select the pin for the LED\nint sensorValue = 0;  \/\/ variable to store the value coming from the sensor\n\nvoid setup() {\n  \/\/ declare the ledPin as an OUTPUT:\n  pinMode(ledPin, OUTPUT);\n}\n\nvoid loop() {\n  \/\/ read the value from the sensor:\n  sensorValue = analogRead(sensorPin);\n  \/\/ turn the ledPin on\n  digitalWrite(ledPin, HIGH);\n  \/\/ stop the program for &lt;sensorValue> milliseconds:\n  delay(sensorValue);\n  \/\/ turn the ledPin off:\n  digitalWrite(ledPin, LOW);\n  \/\/ stop the program for for &lt;sensorValue> milliseconds:\n  delay(sensorValue);\n}<\/pre>\n","protected":false},"excerpt":{"rendered":"<p>Exemple simple avec un potentiom\u00e8tre sur A0, AREF non connect\u00e9 donc a 5V par d\u00e9faut Dans cet exemple on peut faire varier la tension du potentiom\u00e8tre de 0 \u00e0 5V [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"parent":0,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"","meta":{"_crdt_document":"","_uag_custom_page_level_css":"","footnotes":""},"class_list":["post-4095","page","type-page","status-publish","hentry"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.3 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>Le convertisseur Analogique Num\u00e9rique - workboot<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/workboot.fr\/ciela\/le-convertisseur-analogique-numerique\/\" \/>\n<meta property=\"og:locale\" content=\"fr_FR\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Le convertisseur Analogique Num\u00e9rique - workboot\" \/>\n<meta property=\"og:description\" content=\"Exemple simple avec un potentiom\u00e8tre sur A0, AREF non connect\u00e9 donc a 5V par d\u00e9faut Dans cet exemple on peut faire varier la tension du potentiom\u00e8tre de 0 \u00e0 5V [&hellip;]\" \/>\n<meta property=\"og:url\" content=\"https:\/\/workboot.fr\/ciela\/le-convertisseur-analogique-numerique\/\" \/>\n<meta property=\"og:site_name\" content=\"workboot\" \/>\n<meta property=\"article:modified_time\" content=\"2025-09-22T13:43:39+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/workboot.fr\/ciela\/wp-content\/uploads\/2025\/09\/CAN_POT.png\" \/>\n\t<meta property=\"og:image:width\" content=\"1278\" \/>\n\t<meta property=\"og:image:height\" content=\"594\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/png\" \/>\n<meta name=\"twitter:label1\" content=\"Dur\u00e9e de lecture estim\u00e9e\" \/>\n\t<meta name=\"twitter:data1\" content=\"1 minute\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/workboot.fr\\\/ciela\\\/le-convertisseur-analogique-numerique\\\/\",\"url\":\"https:\\\/\\\/workboot.fr\\\/ciela\\\/le-convertisseur-analogique-numerique\\\/\",\"name\":\"Le convertisseur Analogique Num\u00e9rique - workboot\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/workboot.fr\\\/ciela\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/workboot.fr\\\/ciela\\\/le-convertisseur-analogique-numerique\\\/#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/workboot.fr\\\/ciela\\\/le-convertisseur-analogique-numerique\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/workboot.fr\\\/ciela\\\/wp-content\\\/uploads\\\/2025\\\/09\\\/CAN_POT-1024x476.png\",\"datePublished\":\"2025-09-16T07:45:37+00:00\",\"dateModified\":\"2025-09-22T13:43:39+00:00\",\"inLanguage\":\"fr-FR\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/workboot.fr\\\/ciela\\\/le-convertisseur-analogique-numerique\\\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"fr-FR\",\"@id\":\"https:\\\/\\\/workboot.fr\\\/ciela\\\/le-convertisseur-analogique-numerique\\\/#primaryimage\",\"url\":\"https:\\\/\\\/workboot.fr\\\/ciela\\\/wp-content\\\/uploads\\\/2025\\\/09\\\/CAN_POT.png\",\"contentUrl\":\"https:\\\/\\\/workboot.fr\\\/ciela\\\/wp-content\\\/uploads\\\/2025\\\/09\\\/CAN_POT.png\",\"width\":1278,\"height\":594},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/workboot.fr\\\/ciela\\\/#website\",\"url\":\"https:\\\/\\\/workboot.fr\\\/ciela\\\/\",\"name\":\"workboot\",\"description\":\"Open Source, Open Minds \",\"publisher\":{\"@id\":\"https:\\\/\\\/workboot.fr\\\/ciela\\\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/workboot.fr\\\/ciela\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"fr-FR\"},{\"@type\":\"Organization\",\"@id\":\"https:\\\/\\\/workboot.fr\\\/ciela\\\/#organization\",\"name\":\"workboot\",\"url\":\"https:\\\/\\\/workboot.fr\\\/ciela\\\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"fr-FR\",\"@id\":\"https:\\\/\\\/workboot.fr\\\/ciela\\\/#\\\/schema\\\/logo\\\/image\\\/\",\"url\":\"https:\\\/\\\/workboot.fr\\\/ciela\\\/wp-content\\\/uploads\\\/2025\\\/05\\\/logo_ciel-dorian-1.png\",\"contentUrl\":\"https:\\\/\\\/workboot.fr\\\/ciela\\\/wp-content\\\/uploads\\\/2025\\\/05\\\/logo_ciel-dorian-1.png\",\"width\":1024,\"height\":950,\"caption\":\"workboot\"},\"image\":{\"@id\":\"https:\\\/\\\/workboot.fr\\\/ciela\\\/#\\\/schema\\\/logo\\\/image\\\/\"}}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Le convertisseur Analogique Num\u00e9rique - workboot","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/workboot.fr\/ciela\/le-convertisseur-analogique-numerique\/","og_locale":"fr_FR","og_type":"article","og_title":"Le convertisseur Analogique Num\u00e9rique - workboot","og_description":"Exemple simple avec un potentiom\u00e8tre sur A0, AREF non connect\u00e9 donc a 5V par d\u00e9faut Dans cet exemple on peut faire varier la tension du potentiom\u00e8tre de 0 \u00e0 5V [&hellip;]","og_url":"https:\/\/workboot.fr\/ciela\/le-convertisseur-analogique-numerique\/","og_site_name":"workboot","article_modified_time":"2025-09-22T13:43:39+00:00","og_image":[{"width":1278,"height":594,"url":"https:\/\/workboot.fr\/ciela\/wp-content\/uploads\/2025\/09\/CAN_POT.png","type":"image\/png"}],"twitter_misc":{"Dur\u00e9e de lecture estim\u00e9e":"1 minute"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/workboot.fr\/ciela\/le-convertisseur-analogique-numerique\/","url":"https:\/\/workboot.fr\/ciela\/le-convertisseur-analogique-numerique\/","name":"Le convertisseur Analogique Num\u00e9rique - workboot","isPartOf":{"@id":"https:\/\/workboot.fr\/ciela\/#website"},"primaryImageOfPage":{"@id":"https:\/\/workboot.fr\/ciela\/le-convertisseur-analogique-numerique\/#primaryimage"},"image":{"@id":"https:\/\/workboot.fr\/ciela\/le-convertisseur-analogique-numerique\/#primaryimage"},"thumbnailUrl":"https:\/\/workboot.fr\/ciela\/wp-content\/uploads\/2025\/09\/CAN_POT-1024x476.png","datePublished":"2025-09-16T07:45:37+00:00","dateModified":"2025-09-22T13:43:39+00:00","inLanguage":"fr-FR","potentialAction":[{"@type":"ReadAction","target":["https:\/\/workboot.fr\/ciela\/le-convertisseur-analogique-numerique\/"]}]},{"@type":"ImageObject","inLanguage":"fr-FR","@id":"https:\/\/workboot.fr\/ciela\/le-convertisseur-analogique-numerique\/#primaryimage","url":"https:\/\/workboot.fr\/ciela\/wp-content\/uploads\/2025\/09\/CAN_POT.png","contentUrl":"https:\/\/workboot.fr\/ciela\/wp-content\/uploads\/2025\/09\/CAN_POT.png","width":1278,"height":594},{"@type":"WebSite","@id":"https:\/\/workboot.fr\/ciela\/#website","url":"https:\/\/workboot.fr\/ciela\/","name":"workboot","description":"Open Source, Open Minds ","publisher":{"@id":"https:\/\/workboot.fr\/ciela\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/workboot.fr\/ciela\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"fr-FR"},{"@type":"Organization","@id":"https:\/\/workboot.fr\/ciela\/#organization","name":"workboot","url":"https:\/\/workboot.fr\/ciela\/","logo":{"@type":"ImageObject","inLanguage":"fr-FR","@id":"https:\/\/workboot.fr\/ciela\/#\/schema\/logo\/image\/","url":"https:\/\/workboot.fr\/ciela\/wp-content\/uploads\/2025\/05\/logo_ciel-dorian-1.png","contentUrl":"https:\/\/workboot.fr\/ciela\/wp-content\/uploads\/2025\/05\/logo_ciel-dorian-1.png","width":1024,"height":950,"caption":"workboot"},"image":{"@id":"https:\/\/workboot.fr\/ciela\/#\/schema\/logo\/image\/"}}]}},"uagb_featured_image_src":{"full":false,"thumbnail":false,"medium":false,"medium_large":false,"large":false,"1536x1536":false,"2048x2048":false},"uagb_author_info":{"display_name":"admin","author_link":"https:\/\/workboot.fr\/ciela\/author\/admin\/"},"uagb_comment_info":0,"uagb_excerpt":"Exemple simple avec un potentiom\u00e8tre sur A0, AREF non connect\u00e9 donc a 5V par d\u00e9faut Dans cet exemple on peut faire varier la tension du potentiom\u00e8tre de 0 \u00e0 5V [&hellip;]","_links":{"self":[{"href":"https:\/\/workboot.fr\/ciela\/wp-json\/wp\/v2\/pages\/4095","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/workboot.fr\/ciela\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/workboot.fr\/ciela\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/workboot.fr\/ciela\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/workboot.fr\/ciela\/wp-json\/wp\/v2\/comments?post=4095"}],"version-history":[{"count":12,"href":"https:\/\/workboot.fr\/ciela\/wp-json\/wp\/v2\/pages\/4095\/revisions"}],"predecessor-version":[{"id":4186,"href":"https:\/\/workboot.fr\/ciela\/wp-json\/wp\/v2\/pages\/4095\/revisions\/4186"}],"wp:attachment":[{"href":"https:\/\/workboot.fr\/ciela\/wp-json\/wp\/v2\/media?parent=4095"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}