{"id":3474,"date":"2020-02-27T17:15:18","date_gmt":"2020-02-27T17:15:18","guid":{"rendered":"http:\/\/rodmilstead.com\/pt\/?page_id=3474"},"modified":"2026-01-23T16:26:01","modified_gmt":"2026-01-23T16:26:01","slug":"arduino-adding-an-input-button","status":"publish","type":"page","link":"https:\/\/rodmilstead.com\/pt\/arduino-adding-an-input-button\/","title":{"rendered":"Arduino &#8211; adding an input\/button"},"content":{"rendered":"<p>Sure, it&#8217;s fun to make lights blink.<\/p>\n<p>Even more fun to use an input to control what your Arduino can do.<\/p>\n<p>Follow along below and <a href=\"https:\/\/youtu.be\/gzsjSm6s36g\" target=\"_blank\" rel=\"noopener\">turn in your finished program on Canvas.<\/a><\/p>\n<ol>\n<li>BEFORE YOU OPEN your program: <a href=\"https:\/\/youtu.be\/gQ7m4tqlQ18?si=tQwLqxp-whuoD3I1\" target=\"_blank\" rel=\"noopener\">make a copy of\u00a0 your multiple LED program in Tinkercad.<\/a><\/li>\n<li>Use the diagram below to add a button to your circuit. \u00a0Pay close attention to the types of resistors that are used (look at the colored stripes).<\/li>\n<li>after you add the button, use the other diagram below to modify your program so that it works with the button.<\/li>\n<li>when you are done, <a href=\"https:\/\/youtu.be\/gzsjSm6s36g\" target=\"_blank\" rel=\"noopener\">please follow these instructions to share your Tinkercad program on Canvas.\u00a0<\/a><\/li>\n<\/ol>\n<p><strong>Color code:<\/strong><br \/>\nred wires- leading from pins to breadboard<br \/>\nblack wires- ground<br \/>\ngreen wires- button<br \/>\nyellow wires &#8211; input from pin 2<\/p>\n<figure id=\"attachment_3479\" aria-describedby=\"caption-attachment-3479\" style=\"width: 300px\" class=\"wp-caption alignnone\"><a href=\"http:\/\/rodmilstead.com\/pt\/wp-content\/uploads\/2020\/02\/2020-Arduino-sample-input-circuit.png\"><img loading=\"lazy\" decoding=\"async\" class=\"size-medium wp-image-3479\" src=\"http:\/\/rodmilstead.com\/pt\/wp-content\/uploads\/2020\/02\/2020-Arduino-sample-input-circuit-300x225.png\" alt=\"\" width=\"300\" height=\"225\" srcset=\"https:\/\/rodmilstead.com\/pt\/wp-content\/uploads\/2020\/02\/2020-Arduino-sample-input-circuit-300x225.png 300w, https:\/\/rodmilstead.com\/pt\/wp-content\/uploads\/2020\/02\/2020-Arduino-sample-input-circuit-768x576.png 768w, https:\/\/rodmilstead.com\/pt\/wp-content\/uploads\/2020\/02\/2020-Arduino-sample-input-circuit.png 960w\" sizes=\"auto, (max-width: 300px) 100vw, 300px\" \/><\/a><figcaption id=\"caption-attachment-3479\" class=\"wp-caption-text\">click for full size image<\/figcaption><\/figure>\n<p><strong>And now add the code:<br \/>\n<\/strong><\/p>\n<figure id=\"attachment_3505\" aria-describedby=\"caption-attachment-3505\" style=\"width: 300px\" class=\"wp-caption alignnone\"><a href=\"http:\/\/rodmilstead.com\/pt\/wp-content\/uploads\/2020\/03\/2019-Arduino-basic-button-prog-v2.jpg\" target=\"_blank\" rel=\"noopener noreferrer\"><img loading=\"lazy\" decoding=\"async\" class=\"wp-image-3505 size-medium\" src=\"http:\/\/rodmilstead.com\/pt\/wp-content\/uploads\/2020\/03\/2019-Arduino-basic-button-prog-v2-300x247.jpg\" alt=\"\" width=\"300\" height=\"247\" srcset=\"https:\/\/rodmilstead.com\/pt\/wp-content\/uploads\/2020\/03\/2019-Arduino-basic-button-prog-v2-300x247.jpg 300w, https:\/\/rodmilstead.com\/pt\/wp-content\/uploads\/2020\/03\/2019-Arduino-basic-button-prog-v2.jpg 726w\" sizes=\"auto, (max-width: 300px) 100vw, 300px\" \/><\/a><figcaption id=\"caption-attachment-3505\" class=\"wp-caption-text\">click for full sized image<\/figcaption><\/figure>\n","protected":false},"excerpt":{"rendered":"<p>Sure, it&#8217;s fun to make lights blink. Even more fun to use an input to control what your Arduino can do. Follow along below and turn in your finished program on Canvas. BEFORE YOU OPEN your program: make a copy of\u00a0 your multiple LED program in Tinkercad. Use the diagram below to add a button &hellip; <a href=\"https:\/\/rodmilstead.com\/pt\/arduino-adding-an-input-button\/\" class=\"more-link\">Continue reading <span class=\"screen-reader-text\">Arduino &#8211; adding an input\/button<\/span><\/a><\/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-3474","page","type-page","status-publish","hentry"],"_links":{"self":[{"href":"https:\/\/rodmilstead.com\/pt\/wp-json\/wp\/v2\/pages\/3474","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/rodmilstead.com\/pt\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/rodmilstead.com\/pt\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/rodmilstead.com\/pt\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/rodmilstead.com\/pt\/wp-json\/wp\/v2\/comments?post=3474"}],"version-history":[{"count":11,"href":"https:\/\/rodmilstead.com\/pt\/wp-json\/wp\/v2\/pages\/3474\/revisions"}],"predecessor-version":[{"id":5355,"href":"https:\/\/rodmilstead.com\/pt\/wp-json\/wp\/v2\/pages\/3474\/revisions\/5355"}],"wp:attachment":[{"href":"https:\/\/rodmilstead.com\/pt\/wp-json\/wp\/v2\/media?parent=3474"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}