﻿{"id":2173,"date":"2015-09-15T20:46:56","date_gmt":"2015-09-15T19:46:56","guid":{"rendered":"https:\/\/dahoo.fr\/wordpress\/?p=2173"},"modified":"2016-08-02T19:45:54","modified_gmt":"2016-08-02T18:45:54","slug":"arduino-allumage-dune-led","status":"publish","type":"post","link":"https:\/\/dahoo.fr\/wordpress\/arduino-allumage-dune-led\/","title":{"rendered":"Arduino : Allumage d&rsquo;une LED"},"content":{"rendered":"<p>Dans ce tuto, nous allons voir comment allumer une LED simplement.<\/p>\n<p><!--more--><\/p>\n<p>Edit : <a href=\"https:\/\/hack.dahoo.fr\/sketch.php?id=1#resource=2\">Projets disponible sur la Hack zone ici<\/a><\/p>\n<h2>Le but<\/h2>\n<p style=\"text-align: justify;\">Dans cette partie, nous allons \u00e9teindre\u00a0et allumer alternativement toutes les 500ms. Le tuto simple est \u00e0 la port\u00e9 de tout le monde.<\/p>\n<h2>La liste du mat\u00e9riel :<\/h2>\n<ul>\n<li>1 Arduino (bien sur :p)<\/li>\n<li>1 LED<\/li>\n<li>1 Resistance de 220 Hom<\/li>\n<li>2 Fils<\/li>\n<li>1 BreadBoard<\/li>\n<li>1 tase de caf\u00e9 (Pour moi de la tisane)<\/li>\n<\/ul>\n<p>&nbsp;<\/p>\n<h2>Le montage<\/h2>\n<p style=\"text-align: justify;\">Le montage reste relativement simple (ben oui, faut bien commencer quelques part :p)<\/p>\n<p style=\"text-align: justify;\">On branche la PIN 7 sur la BreadBoard puis \u00e0 la r\u00e9sistance (pour pas faire p\u00e9ter la LED, \u00e7a serait b\u00eate). Ensuite, on branche la LED en s\u00e9rie (Attention : il y a un sens de branchement, elle est polarisante. Si elle s&rsquo;allume pas inversez le sens). Et pour finir, reliez la patte restante au GND du Arduino.<\/p>\n<p><a href=\"https:\/\/dahoo.fr\/wordpress\/wp-content\/uploads\/2015\/09\/Tuto-1_bb.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-2174\" src=\"https:\/\/dahoo.fr\/wordpress\/wp-content\/uploads\/2015\/09\/Tuto-1_bb.png\" alt=\"Tuto 1_bb\" width=\"1361\" height=\"890\" srcset=\"https:\/\/dahoo.fr\/wordpress\/wp-content\/uploads\/2015\/09\/Tuto-1_bb.png 1361w, https:\/\/dahoo.fr\/wordpress\/wp-content\/uploads\/2015\/09\/Tuto-1_bb-300x196.png 300w, https:\/\/dahoo.fr\/wordpress\/wp-content\/uploads\/2015\/09\/Tuto-1_bb-1024x670.png 1024w, https:\/\/dahoo.fr\/wordpress\/wp-content\/uploads\/2015\/09\/Tuto-1_bb-90x60.png 90w\" sizes=\"auto, (max-width: 1361px) 100vw, 1361px\" \/><\/a><\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<h2>Le code<\/h2>\n<p>[highlighter]<\/p>\n<pre>int ledPin = 7; \/\/ D\u00e9claration du Pin 7\r\n\r\nvoid setup() {\r\n    pinMode(ledPin, OUTPUT); \/\/ On spc\u00e9sifie que le Pin est en sortie\r\n}\r\n\r\nvoid loop() {\r\n    digitalWrite(ledPin, HIGH);\u00a0\u00a0 \/\/ On allulme la LED\r\n    delay(500);\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0  \/\/ On attend 500ms\r\n    digitalWrite(ledPin, LOW);\u00a0\u00a0\u00a0 \/\/ On etainte la LED\r\n    delay(500);\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0  \/\/ On attend 500ms\r\n}\r\n\r\n<\/pre>\n<p>&nbsp;<\/p>\n<h2>T\u00e9l\u00e9chargement<\/h2>\n<p><a href=\"https:\/\/download.dahoo.fr\/Projets\/Arduino\/led\/\" target=\"_blank\">Lien ici<\/a><\/p>\n<p>&nbsp;<\/p>\n<h2>Sommaire<\/h2>\n<p><a href=\"https:\/\/dahoo.fr\/wordpress\/sommaire-projet-arduino\/\">Retour au sommaire\u00a0<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Dans ce tuto, nous allons voir comment allumer une LED simplement.<\/p>\n","protected":false},"author":1,"featured_media":2174,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"image","meta":{"footnotes":""},"categories":[80],"tags":[],"class_list":["post-2173","post","type-post","status-publish","format-image","has-post-thumbnail","hentry","category-arduino","post_format-post-format-image"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v28.8 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>Arduino : Allumage d&#039;une LED - D@hoo<\/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:\/\/dahoo.fr\/wordpress\/arduino-allumage-dune-led\/\" \/>\n<meta property=\"og:locale\" content=\"fr_FR\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Arduino : Allumage d&#039;une LED - D@hoo\" \/>\n<meta property=\"og:description\" content=\"Dans ce tuto, nous allons voir comment allumer une LED simplement.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/dahoo.fr\/wordpress\/arduino-allumage-dune-led\/\" \/>\n<meta property=\"og:site_name\" content=\"D@hoo\" \/>\n<meta property=\"article:published_time\" content=\"2015-09-15T19:46:56+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2016-08-02T18:45:54+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/dahoo.fr\/wordpress\/wp-content\/uploads\/2015\/09\/Tuto-1_bb.png\" \/>\n\t<meta property=\"og:image:width\" content=\"1361\" \/>\n\t<meta property=\"og:image:height\" content=\"890\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/png\" \/>\n<meta name=\"author\" content=\"Fabacks\" \/>\n<meta name=\"twitter:label1\" content=\"\u00c9crit par\" \/>\n\t<meta name=\"twitter:data1\" content=\"Fabacks\" \/>\n\t<meta name=\"twitter:label2\" content=\"Dur\u00e9e de lecture estim\u00e9e\" \/>\n\t<meta name=\"twitter:data2\" content=\"1 minute\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/dahoo.fr\\\/wordpress\\\/arduino-allumage-dune-led\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/dahoo.fr\\\/wordpress\\\/arduino-allumage-dune-led\\\/\"},\"author\":{\"name\":\"Fabacks\",\"@id\":\"https:\\\/\\\/dahoo.fr\\\/wordpress\\\/#\\\/schema\\\/person\\\/08ab6e7b6f186b7e033fe862d72137d2\"},\"headline\":\"Arduino : Allumage d&rsquo;une LED\",\"datePublished\":\"2015-09-15T19:46:56+00:00\",\"dateModified\":\"2016-08-02T18:45:54+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/dahoo.fr\\\/wordpress\\\/arduino-allumage-dune-led\\\/\"},\"wordCount\":163,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\\\/\\\/dahoo.fr\\\/wordpress\\\/#\\\/schema\\\/person\\\/08ab6e7b6f186b7e033fe862d72137d2\"},\"image\":{\"@id\":\"https:\\\/\\\/dahoo.fr\\\/wordpress\\\/arduino-allumage-dune-led\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/dahoo.fr\\\/wordpress\\\/wp-content\\\/uploads\\\/2015\\\/09\\\/Tuto-1_bb.png\",\"articleSection\":[\"Arduino\"],\"inLanguage\":\"fr-FR\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\\\/\\\/dahoo.fr\\\/wordpress\\\/arduino-allumage-dune-led\\\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/dahoo.fr\\\/wordpress\\\/arduino-allumage-dune-led\\\/\",\"url\":\"https:\\\/\\\/dahoo.fr\\\/wordpress\\\/arduino-allumage-dune-led\\\/\",\"name\":\"Arduino : Allumage d'une LED - D@hoo\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/dahoo.fr\\\/wordpress\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/dahoo.fr\\\/wordpress\\\/arduino-allumage-dune-led\\\/#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/dahoo.fr\\\/wordpress\\\/arduino-allumage-dune-led\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/dahoo.fr\\\/wordpress\\\/wp-content\\\/uploads\\\/2015\\\/09\\\/Tuto-1_bb.png\",\"datePublished\":\"2015-09-15T19:46:56+00:00\",\"dateModified\":\"2016-08-02T18:45:54+00:00\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/dahoo.fr\\\/wordpress\\\/arduino-allumage-dune-led\\\/#breadcrumb\"},\"inLanguage\":\"fr-FR\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/dahoo.fr\\\/wordpress\\\/arduino-allumage-dune-led\\\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"fr-FR\",\"@id\":\"https:\\\/\\\/dahoo.fr\\\/wordpress\\\/arduino-allumage-dune-led\\\/#primaryimage\",\"url\":\"https:\\\/\\\/dahoo.fr\\\/wordpress\\\/wp-content\\\/uploads\\\/2015\\\/09\\\/Tuto-1_bb.png\",\"contentUrl\":\"https:\\\/\\\/dahoo.fr\\\/wordpress\\\/wp-content\\\/uploads\\\/2015\\\/09\\\/Tuto-1_bb.png\",\"width\":1361,\"height\":890},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/dahoo.fr\\\/wordpress\\\/arduino-allumage-dune-led\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Accueil\",\"item\":\"https:\\\/\\\/dahoo.fr\\\/wordpress\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Arduino : Allumage d&rsquo;une LED\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/dahoo.fr\\\/wordpress\\\/#website\",\"url\":\"https:\\\/\\\/dahoo.fr\\\/wordpress\\\/\",\"name\":\"D@hoo\",\"description\":\"La taverne du geek\",\"publisher\":{\"@id\":\"https:\\\/\\\/dahoo.fr\\\/wordpress\\\/#\\\/schema\\\/person\\\/08ab6e7b6f186b7e033fe862d72137d2\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/dahoo.fr\\\/wordpress\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"fr-FR\"},{\"@type\":[\"Person\",\"Organization\"],\"@id\":\"https:\\\/\\\/dahoo.fr\\\/wordpress\\\/#\\\/schema\\\/person\\\/08ab6e7b6f186b7e033fe862d72137d2\",\"name\":\"Fabacks\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"fr-FR\",\"@id\":\"https:\\\/\\\/dahoo.fr\\\/wordpress\\\/wp-content\\\/uploads\\\/2015\\\/11\\\/cropped-logo-Dahoo.png\",\"url\":\"https:\\\/\\\/dahoo.fr\\\/wordpress\\\/wp-content\\\/uploads\\\/2015\\\/11\\\/cropped-logo-Dahoo.png\",\"contentUrl\":\"https:\\\/\\\/dahoo.fr\\\/wordpress\\\/wp-content\\\/uploads\\\/2015\\\/11\\\/cropped-logo-Dahoo.png\",\"width\":147,\"height\":174,\"caption\":\"Fabacks\"},\"logo\":{\"@id\":\"https:\\\/\\\/dahoo.fr\\\/wordpress\\\/wp-content\\\/uploads\\\/2015\\\/11\\\/cropped-logo-Dahoo.png\"},\"description\":\"Fabacks, fondateur du projet Dahoo proposant des news, des tutos, des tests tout cela gratuitement. Un bidouilleur et fan d'informatique en tout genre qui vous fera partager ses exp\u00e9riences.\",\"sameAs\":[\"https:\\\/\\\/dahoo.fr\"],\"url\":\"https:\\\/\\\/dahoo.fr\\\/wordpress\\\/author\\\/fabien\\\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Arduino : Allumage d'une LED - D@hoo","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:\/\/dahoo.fr\/wordpress\/arduino-allumage-dune-led\/","og_locale":"fr_FR","og_type":"article","og_title":"Arduino : Allumage d'une LED - D@hoo","og_description":"Dans ce tuto, nous allons voir comment allumer une LED simplement.","og_url":"https:\/\/dahoo.fr\/wordpress\/arduino-allumage-dune-led\/","og_site_name":"D@hoo","article_published_time":"2015-09-15T19:46:56+00:00","article_modified_time":"2016-08-02T18:45:54+00:00","og_image":[{"width":1361,"height":890,"url":"https:\/\/dahoo.fr\/wordpress\/wp-content\/uploads\/2015\/09\/Tuto-1_bb.png","type":"image\/png"}],"author":"Fabacks","twitter_misc":{"\u00c9crit par":"Fabacks","Dur\u00e9e de lecture estim\u00e9e":"1 minute"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/dahoo.fr\/wordpress\/arduino-allumage-dune-led\/#article","isPartOf":{"@id":"https:\/\/dahoo.fr\/wordpress\/arduino-allumage-dune-led\/"},"author":{"name":"Fabacks","@id":"https:\/\/dahoo.fr\/wordpress\/#\/schema\/person\/08ab6e7b6f186b7e033fe862d72137d2"},"headline":"Arduino : Allumage d&rsquo;une LED","datePublished":"2015-09-15T19:46:56+00:00","dateModified":"2016-08-02T18:45:54+00:00","mainEntityOfPage":{"@id":"https:\/\/dahoo.fr\/wordpress\/arduino-allumage-dune-led\/"},"wordCount":163,"commentCount":0,"publisher":{"@id":"https:\/\/dahoo.fr\/wordpress\/#\/schema\/person\/08ab6e7b6f186b7e033fe862d72137d2"},"image":{"@id":"https:\/\/dahoo.fr\/wordpress\/arduino-allumage-dune-led\/#primaryimage"},"thumbnailUrl":"https:\/\/dahoo.fr\/wordpress\/wp-content\/uploads\/2015\/09\/Tuto-1_bb.png","articleSection":["Arduino"],"inLanguage":"fr-FR","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/dahoo.fr\/wordpress\/arduino-allumage-dune-led\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/dahoo.fr\/wordpress\/arduino-allumage-dune-led\/","url":"https:\/\/dahoo.fr\/wordpress\/arduino-allumage-dune-led\/","name":"Arduino : Allumage d'une LED - D@hoo","isPartOf":{"@id":"https:\/\/dahoo.fr\/wordpress\/#website"},"primaryImageOfPage":{"@id":"https:\/\/dahoo.fr\/wordpress\/arduino-allumage-dune-led\/#primaryimage"},"image":{"@id":"https:\/\/dahoo.fr\/wordpress\/arduino-allumage-dune-led\/#primaryimage"},"thumbnailUrl":"https:\/\/dahoo.fr\/wordpress\/wp-content\/uploads\/2015\/09\/Tuto-1_bb.png","datePublished":"2015-09-15T19:46:56+00:00","dateModified":"2016-08-02T18:45:54+00:00","breadcrumb":{"@id":"https:\/\/dahoo.fr\/wordpress\/arduino-allumage-dune-led\/#breadcrumb"},"inLanguage":"fr-FR","potentialAction":[{"@type":"ReadAction","target":["https:\/\/dahoo.fr\/wordpress\/arduino-allumage-dune-led\/"]}]},{"@type":"ImageObject","inLanguage":"fr-FR","@id":"https:\/\/dahoo.fr\/wordpress\/arduino-allumage-dune-led\/#primaryimage","url":"https:\/\/dahoo.fr\/wordpress\/wp-content\/uploads\/2015\/09\/Tuto-1_bb.png","contentUrl":"https:\/\/dahoo.fr\/wordpress\/wp-content\/uploads\/2015\/09\/Tuto-1_bb.png","width":1361,"height":890},{"@type":"BreadcrumbList","@id":"https:\/\/dahoo.fr\/wordpress\/arduino-allumage-dune-led\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Accueil","item":"https:\/\/dahoo.fr\/wordpress\/"},{"@type":"ListItem","position":2,"name":"Arduino : Allumage d&rsquo;une LED"}]},{"@type":"WebSite","@id":"https:\/\/dahoo.fr\/wordpress\/#website","url":"https:\/\/dahoo.fr\/wordpress\/","name":"D@hoo","description":"La taverne du geek","publisher":{"@id":"https:\/\/dahoo.fr\/wordpress\/#\/schema\/person\/08ab6e7b6f186b7e033fe862d72137d2"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/dahoo.fr\/wordpress\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"fr-FR"},{"@type":["Person","Organization"],"@id":"https:\/\/dahoo.fr\/wordpress\/#\/schema\/person\/08ab6e7b6f186b7e033fe862d72137d2","name":"Fabacks","image":{"@type":"ImageObject","inLanguage":"fr-FR","@id":"https:\/\/dahoo.fr\/wordpress\/wp-content\/uploads\/2015\/11\/cropped-logo-Dahoo.png","url":"https:\/\/dahoo.fr\/wordpress\/wp-content\/uploads\/2015\/11\/cropped-logo-Dahoo.png","contentUrl":"https:\/\/dahoo.fr\/wordpress\/wp-content\/uploads\/2015\/11\/cropped-logo-Dahoo.png","width":147,"height":174,"caption":"Fabacks"},"logo":{"@id":"https:\/\/dahoo.fr\/wordpress\/wp-content\/uploads\/2015\/11\/cropped-logo-Dahoo.png"},"description":"Fabacks, fondateur du projet Dahoo proposant des news, des tutos, des tests tout cela gratuitement. Un bidouilleur et fan d'informatique en tout genre qui vous fera partager ses exp\u00e9riences.","sameAs":["https:\/\/dahoo.fr"],"url":"https:\/\/dahoo.fr\/wordpress\/author\/fabien\/"}]}},"_links":{"self":[{"href":"https:\/\/dahoo.fr\/wordpress\/wp-json\/wp\/v2\/posts\/2173","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/dahoo.fr\/wordpress\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/dahoo.fr\/wordpress\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/dahoo.fr\/wordpress\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/dahoo.fr\/wordpress\/wp-json\/wp\/v2\/comments?post=2173"}],"version-history":[{"count":0,"href":"https:\/\/dahoo.fr\/wordpress\/wp-json\/wp\/v2\/posts\/2173\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/dahoo.fr\/wordpress\/wp-json\/wp\/v2\/media\/2174"}],"wp:attachment":[{"href":"https:\/\/dahoo.fr\/wordpress\/wp-json\/wp\/v2\/media?parent=2173"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/dahoo.fr\/wordpress\/wp-json\/wp\/v2\/categories?post=2173"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/dahoo.fr\/wordpress\/wp-json\/wp\/v2\/tags?post=2173"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}