{"id":4019,"date":"2020-04-28T18:19:31","date_gmt":"2020-04-28T16:19:31","guid":{"rendered":"http:\/\/www.ardpylab.fr\/?page_id=4019"},"modified":"2020-05-10T18:36:01","modified_gmt":"2020-05-10T16:36:01","slug":"projet-1-activite-2-2","status":"publish","type":"page","link":"https:\/\/www.ardpylab.fr\/?page_id=4019","title":{"rendered":"Projet 1 &#8211; Activit\u00e9 2"},"content":{"rendered":"\n<h2 style=\"text-align: center;\"><strong><em>\u201dAllumer une DEL avec un bouton-poussoir\u201d<\/em><\/strong><\/h2>\n<p>&nbsp;<\/p>\n\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-large\"><img loading=\"lazy\" decoding=\"async\" class=\"wp-image-3297 aligncenter\" style=\"border: 3px solid #eeeeee; padding: 3px; margin: 3px;\" src=\"https:\/\/www.ardpylab.fr\/wp-content\/uploads\/2020\/04\/projet1-circuit4.png\" alt=\"\" width=\"476\" height=\"371\"><\/figure>\n<\/div>\n<p>&nbsp;<\/p>\n\n\n\n<p>Dans cette activit\u00e9, la DEL, pr\u00e9alablement choisie, s\u2019allume en appuyant sur le bouton poussoir et s\u2019\u00e9teint si on le rel\u00e2che.<\/p>\n<p>L\u2019objectif est de se familiariser avec les entr\u00e9es num\u00e9riques de l&rsquo;Arduino.\u00a0<\/p>\n<p>En effet, en appuyant sur le bouton poussoir, une tension de + 5V est appliqu\u00e9e sur la broche sur laquelle il est connect\u00e9. La broche est alors \u00e0 un niveau haut.<\/p>\n<p>Si on rel\u00e2che le bouton poussoir, le circuit \u00e9lectrique est ouvert, la tension sur la broche du bouton poussoir est alors de 0 V et passe \u00e0 un niveau bas.\u00a0<\/p>\n<p>Si on demande \u00e0 l&rsquo;Arduino d&rsquo;interroger l&rsquo;\u00e9tat logique (<strong>niveau haut ou bas<\/strong>) de la broche du bouton poussoir qui a \u00e9t\u00e9 d\u00e9clar\u00e9 comme une entr\u00e9e num\u00e9rique, on peut savoir si celui-ci est appuy\u00e9 ou pas et donc lui donner l&rsquo;ordre d&rsquo;allumer ou d&rsquo;\u00e9teindre la DEL.<br \/><br \/><\/p>\n\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-large\">\n<div id=\"attachment_4402\" style=\"width: 730px\" class=\"wp-caption alignnone\"><img loading=\"lazy\" decoding=\"async\" aria-describedby=\"caption-attachment-4402\" class=\"wp-image-4402 size-large\" style=\"border: 3px solid #eeeeee; padding: 3px; margin: 3px;\" src=\"https:\/\/www.ardpylab.fr\/wp-content\/uploads\/2020\/04\/arduinolab-projet1-ce2-1024x576.png\" alt=\"\" width=\"720\" height=\"405\" srcset=\"https:\/\/www.ardpylab.fr\/wp-content\/uploads\/2020\/04\/arduinolab-projet1-ce2-1024x576.png 1024w, https:\/\/www.ardpylab.fr\/wp-content\/uploads\/2020\/04\/arduinolab-projet1-ce2-300x169.png 300w, https:\/\/www.ardpylab.fr\/wp-content\/uploads\/2020\/04\/arduinolab-projet1-ce2-768x432.png 768w, https:\/\/www.ardpylab.fr\/wp-content\/uploads\/2020\/04\/arduinolab-projet1-ce2.png 1366w\" sizes=\"auto, (max-width: 720px) 100vw, 720px\" \/><p id=\"caption-attachment-4402\" class=\"wp-caption-text\">ARDUINO LAB &#8211; Fen\u00eatre \u00ab\u00a0Projet 1 &#8211; Activit\u00e9 2\u00a0\u00bb<\/p><\/div>\n<\/figure>\n<\/div>\n<p>\u00a0<\/p>\n\n\n<div  class=\"grids-section grids-is-advanced\" style=\"--_gs-gap-desktop:0px 0px;--_gs-m-desktop:0 0 0 0;--_gs-p-desktop:0 0 0 0;--_gs-bg-desktop:transparent none;--_gs-bg-xp-desktop:0px;--_gs-zi-desktop:auto;--_gs-d-desktop:block;--_gs-mw-desktop:calc(100% - 0 - 0);--_gs-gap-tablet:0px 0px;--_gs-m-tablet:0 0 0 0;--_gs-p-tablet:0 0 0 0;--_gs-bg-tablet:transparent none;--_gs-bg-xp-tablet:0px;--_gs-zi-tablet:auto;--_gs-d-tablet:block;--_gs-mw-tablet:calc(100% - 0 - 0);--_gs-gap-mobile:0px 0px;--_gs-m-mobile:0 0 0 0;--_gs-p-mobile:0 0 0 0;--_gs-bg-mobile:transparent none;--_gs-bg-xp-mobile:0px;--_gs-zi-mobile:auto;--_gs-d-mobile:block;--_gs-mw-mobile:calc(100% - 0 - 0);--_gs-columns:12;--_gs-rows:6\"><div class=\"grids-s-w_i\">\n<div class=\"grids-area\" style=\"--_ga-column:1\/9;--_ga-row:1\/2;--_ga-m-desktop:0 0 0 0;--_ga-p-desktop:0 0 0 0;--_ga-bg-desktop:transparent none;--_ga-zi-desktop:auto;--_ga-d-desktop:flex;--_ga-mw-desktop:calc(100% - 0 - 0);--_ga-m-tablet:0 0 0 0;--_ga-p-tablet:0 0 0 0;--_ga-bg-tablet:transparent none;--_ga-zi-tablet:auto;--_ga-d-tablet:flex;--_ga-mw-tablet:calc(100% - 0 - 0);--_ga-m-mobile:0 0 0 0;--_ga-p-mobile:0 0 0 0;--_ga-bg-mobile:transparent none;--_ga-zi-mobile:auto;--_ga-d-mobile:flex;--_ga-mw-mobile:calc(100% - 0 - 0)\">\n\n<p>Apr\u00e8s avoir cliqu\u00e9 sur le connecteur USB, le choix de la DEL est fait par l\u2019interm\u00e9diaire de ce menu&nbsp;:<\/p>\n\n<\/div>\n\n<div class=\"grids-area\" style=\"--_ga-column:9\/13;--_ga-row:1\/2;--_ga-m-desktop:0 0 0 0;--_ga-p-desktop:0 0 0 0;--_ga-bg-desktop:transparent none;--_ga-zi-desktop:auto;--_ga-d-desktop:flex;--_ga-mw-desktop:calc(100% - 0 - 0);--_ga-m-tablet:0 0 0 0;--_ga-p-tablet:0 0 0 0;--_ga-bg-tablet:transparent none;--_ga-zi-tablet:auto;--_ga-d-tablet:flex;--_ga-mw-tablet:calc(100% - 0 - 0);--_ga-m-mobile:0 0 0 0;--_ga-p-mobile:0 0 0 0;--_ga-bg-mobile:transparent none;--_ga-zi-mobile:auto;--_ga-d-mobile:flex;--_ga-mw-mobile:calc(100% - 0 - 0)\">\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-large\"><img loading=\"lazy\" decoding=\"async\" class=\"wp-image-4006 aligncenter\" style=\"border: 3px solid #eeeeee; padding: 3px; margin: 3px;\" src=\"https:\/\/www.ardpylab.fr\/wp-content\/uploads\/2020\/04\/arduinolab-projet1-1.png\" alt=\"\" width=\"90\" height=\"189\"><\/figure>\n<\/div>\n<p>&nbsp;<\/p>\n\n<\/div>\n<\/div><\/div>\n\n\n<p>Si le mode de fonctionnement est le <strong>\u201dcontr\u00f4le de l\u2019Arduino\u201d<\/strong>, la DEL du circuit r\u00e9el et la DEL sur l\u2019\u00e9cran s\u2019allument en appuyant sur le bouton poussoir du circuit r\u00e9el ou sur celui du circuit affich\u00e9 sur l\u2019\u00e9cran :<\/p>\n\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-large\"><img loading=\"lazy\" decoding=\"async\" class=\"wp-image-4011 aligncenter\" style=\"border: 3px solid #eeeeee; padding: 3px; margin: 3px;\" src=\"https:\/\/www.ardpylab.fr\/wp-content\/uploads\/2020\/04\/arduinolab-projet1-2-1024x491.png\" alt=\"\" width=\"580\" height=\"281\"><\/figure>\n<\/div>\n<p>&nbsp;<\/p>\n\n\n\n<p>A tout moment, il est possible de visualiser le code et son algorithme, programm\u00e9 en langage Arduino IDE ou en Python, permettant de r\u00e9aliser cette activit\u00e9, en cliquant sur les boutons&nbsp;:<\/p>\n\n\n<div  class=\"grids-section grids-is-stretch\" style=\"--_gs-gap-desktop:0px 0px;--_gs-m-desktop:0 0 0 0;--_gs-p-desktop:0 0 0 0;--_gs-bg-desktop:transparent none;--_gs-bg-xp-desktop:0px;--_gs-zi-desktop:auto;--_gs-d-desktop:block;--_gs-mw-desktop:calc(100% - 0 - 0);--_gs-gap-tablet:0px 0px;--_gs-m-tablet:0 0 0 0;--_gs-p-tablet:0 0 0 0;--_gs-bg-tablet:transparent none;--_gs-bg-xp-tablet:0px;--_gs-zi-tablet:auto;--_gs-d-tablet:block;--_gs-mw-tablet:calc(100% - 0 - 0);--_gs-gap-mobile:0px 0px;--_gs-m-mobile:0 0 0 0;--_gs-p-mobile:0 0 0 0;--_gs-bg-mobile:transparent none;--_gs-bg-xp-mobile:0px;--_gs-zi-mobile:auto;--_gs-d-mobile:block;--_gs-mw-mobile:calc(100% - 0 - 0);--_gs-columns:2;--_gs-rows:1\"><div class=\"grids-s-w_i\">\n<div class=\"grids-area\" style=\"--_ga-column:1\/2;--_ga-row:1\/2;--_ga-m-desktop:0 0 0 0;--_ga-p-desktop:0 0 0 0;--_ga-bg-desktop:transparent none;--_ga-zi-desktop:auto;--_ga-d-desktop:flex;--_ga-mw-desktop:calc(100% - 0 - 0);--_ga-m-tablet:0 0 0 0;--_ga-p-tablet:0 0 0 0;--_ga-bg-tablet:transparent none;--_ga-zi-tablet:auto;--_ga-d-tablet:flex;--_ga-mw-tablet:calc(100% - 0 - 0);--_ga-m-mobile:0 0 0 0;--_ga-p-mobile:0 0 0 0;--_ga-bg-mobile:transparent none;--_ga-zi-mobile:auto;--_ga-d-mobile:flex;--_ga-mw-mobile:calc(100% - 0 - 0)\">\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-large\"><a href=\"https:\/\/www.ardpylab.fr\/?page_id=3200\/#prog2\" data-wplink-url-error=\"true\"><img loading=\"lazy\" decoding=\"async\" width=\"61\" height=\"63\" class=\"wp-image-3953 aligncenter\" style=\"border: 3px solid #eeeeee; padding: 3px; margin: 3px;\" src=\"https:\/\/www.ardpylab.fr\/wp-content\/uploads\/2020\/04\/arduinolab-img12.png\" alt=\"\"><\/a><\/figure>\n<\/div>\n<p>&nbsp;<\/p>\n\n<\/div>\n\n<div class=\"grids-area\" style=\"--_ga-column:2\/3;--_ga-row:1\/2;--_ga-m-desktop:0 0 0 0;--_ga-p-desktop:0 0 0 0;--_ga-bg-desktop:transparent none;--_ga-zi-desktop:auto;--_ga-d-desktop:flex;--_ga-mw-desktop:calc(100% - 0 - 0);--_ga-m-tablet:0 0 0 0;--_ga-p-tablet:0 0 0 0;--_ga-bg-tablet:transparent none;--_ga-zi-tablet:auto;--_ga-d-tablet:flex;--_ga-mw-tablet:calc(100% - 0 - 0);--_ga-m-mobile:0 0 0 0;--_ga-p-mobile:0 0 0 0;--_ga-bg-mobile:transparent none;--_ga-zi-mobile:auto;--_ga-d-mobile:flex;--_ga-mw-mobile:calc(100% - 0 - 0)\">\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-large\"><a href=\"https:\/\/www.ardpylab.fr\/?page_id=3200\/#prog1\" data-wplink-url-error=\"true\"><img loading=\"lazy\" decoding=\"async\" width=\"61\" height=\"63\" class=\"wp-image-3964 aligncenter\" style=\"border: 3px solid #eeeeee; padding: 3px; margin: 3px;\" src=\"https:\/\/www.ardpylab.fr\/wp-content\/uploads\/2020\/04\/arduinolab-img14.png\" alt=\"\"><\/a><\/figure>\n<\/div>\n<p>&nbsp;<\/p>\n\n<\/div>\n<\/div><\/div>\n\n\n<p>Le code pourra \u00eatre modifi\u00e9 pour voir l\u2019influence des variables (num\u00e9ro de la broche de la DEL).<\/p>\n<p>\u00a0<\/p>\n\n\n<div  class=\"grids-section grids-is-stretch\" style=\"--_gs-gap-desktop:0px 0px;--_gs-m-desktop:0 0 0 0;--_gs-p-desktop:0 0 0 0;--_gs-bg-desktop:transparent none;--_gs-bg-xp-desktop:0px;--_gs-zi-desktop:auto;--_gs-d-desktop:block;--_gs-mw-desktop:calc(100% - 0 - 0);--_gs-gap-tablet:0px 0px;--_gs-m-tablet:0 0 0 0;--_gs-p-tablet:0 0 0 0;--_gs-bg-tablet:transparent none;--_gs-bg-xp-tablet:0px;--_gs-zi-tablet:auto;--_gs-d-tablet:block;--_gs-mw-tablet:calc(100% - 0 - 0);--_gs-gap-mobile:0px 0px;--_gs-m-mobile:0 0 0 0;--_gs-p-mobile:0 0 0 0;--_gs-bg-mobile:transparent none;--_gs-bg-xp-mobile:0px;--_gs-zi-mobile:auto;--_gs-d-mobile:block;--_gs-mw-mobile:calc(100% - 0 - 0);--_gs-columns:2;--_gs-rows:1\"><div class=\"grids-s-w_i\">\n<div class=\"grids-area\" style=\"--_ga-column:1\/2;--_ga-row:1\/2;--_ga-m-desktop:0 0 0 0;--_ga-p-desktop:0 0 0 0;--_ga-bg-desktop:transparent none;--_ga-zi-desktop:auto;--_ga-d-desktop:flex;--_ga-mw-desktop:calc(100% - 0 - 0);--_ga-m-tablet:0 0 0 0;--_ga-p-tablet:0 0 0 0;--_ga-bg-tablet:transparent none;--_ga-zi-tablet:auto;--_ga-d-tablet:flex;--_ga-mw-tablet:calc(100% - 0 - 0);--_ga-m-mobile:0 0 0 0;--_ga-p-mobile:0 0 0 0;--_ga-bg-mobile:transparent none;--_ga-zi-mobile:auto;--_ga-d-mobile:flex;--_ga-mw-mobile:calc(100% - 0 - 0)\">\n\n<div class=\"wp-block-image\"><figure class=\"alignleft size-large\"><a href=\"https:\/\/www.ardpylab.fr\/?page_id=4005\"><img loading=\"lazy\" decoding=\"async\" width=\"50\" height=\"28\" src=\"https:\/\/www.ardpylab.fr\/wp-content\/uploads\/2020\/03\/moins.jpg\" alt=\"\" class=\"wp-image-107\"\/><\/a><\/figure><\/div>\n\n<\/div>\n\n<div class=\"grids-area\" style=\"--_ga-column:2\/3;--_ga-row:1\/2;--_ga-m-desktop:0 0 0 0;--_ga-p-desktop:0 0 0 0;--_ga-bg-desktop:transparent none;--_ga-zi-desktop:auto;--_ga-d-desktop:flex;--_ga-mw-desktop:calc(100% - 0 - 0);--_ga-m-tablet:0 0 0 0;--_ga-p-tablet:0 0 0 0;--_ga-bg-tablet:transparent none;--_ga-zi-tablet:auto;--_ga-d-tablet:flex;--_ga-mw-tablet:calc(100% - 0 - 0);--_ga-m-mobile:0 0 0 0;--_ga-p-mobile:0 0 0 0;--_ga-bg-mobile:transparent none;--_ga-zi-mobile:auto;--_ga-d-mobile:flex;--_ga-mw-mobile:calc(100% - 0 - 0)\">\n\n<div class=\"wp-block-image\"><figure class=\"alignright size-large\"><a href=\"https:\/\/www.ardpylab.fr\/?page_id=4025\"><img loading=\"lazy\" decoding=\"async\" width=\"50\" height=\"28\" src=\"https:\/\/www.ardpylab.fr\/wp-content\/uploads\/2020\/03\/plus.jpg\" alt=\"\" class=\"wp-image-106\"\/><\/a><\/figure><\/div>\n\n<\/div>\n<\/div><\/div>\n\n\n\n","protected":false},"excerpt":{"rendered":"<p>\u201dAllumer une DEL avec un bouton-poussoir\u201d &nbsp; &nbsp; Dans cette activit\u00e9, la DEL, pr\u00e9alablement choisie, s\u2019allume en appuyant sur le bouton poussoir et s\u2019\u00e9teint si on le rel\u00e2che. L\u2019objectif est de se familiariser avec les entr\u00e9es num\u00e9riques de l&rsquo;Arduino.\u00a0 En effet, en appuyant sur le bouton poussoir, une tension de + 5V est appliqu\u00e9e sur [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"parent":0,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"","meta":{"footnotes":""},"class_list":["post-4019","page","type-page","status-publish","hentry"],"_links":{"self":[{"href":"https:\/\/www.ardpylab.fr\/index.php?rest_route=\/wp\/v2\/pages\/4019","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.ardpylab.fr\/index.php?rest_route=\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/www.ardpylab.fr\/index.php?rest_route=\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/www.ardpylab.fr\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.ardpylab.fr\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=4019"}],"version-history":[{"count":0,"href":"https:\/\/www.ardpylab.fr\/index.php?rest_route=\/wp\/v2\/pages\/4019\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.ardpylab.fr\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=4019"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}