{"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 https:\/\/wokwi.com\/projects\/442447726975929345 Proposer un code qui va afficher sur le terminal s\u00e9rie la tension en Volt, on va r\u00e9aliser un voltm\u00e8tre num\u00e9rique utiliser q , le [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"parent":0,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"","meta":{"_uag_custom_page_level_css":"","footnotes":""},"class_list":["post-4095","page","type-page","status-publish","hentry"],"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 https:\/\/wokwi.com\/projects\/442447726975929345 Proposer un code qui va afficher sur le terminal s\u00e9rie la tension en Volt, on va r\u00e9aliser un voltm\u00e8tre num\u00e9rique utiliser q , le\u2026","_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}]}}