{"id":598,"date":"2017-02-27T23:47:32","date_gmt":"2017-02-27T23:47:32","guid":{"rendered":"https:\/\/zhutarduino.wordpress.com\/?page_id=598"},"modified":"2020-10-12T16:22:42","modified_gmt":"2020-10-12T16:22:42","slug":"arduino-how-to-blink-a-led-without-using-delays-in-your-sketch","status":"publish","type":"page","link":"https:\/\/thezhut.com\/?page_id=598","title":{"rendered":"ARDUINO, How to blink a LED without using delays in your sketch"},"content":{"rendered":"<h1>This ARDUINO tutorial will show you how to use a 555 timer to blink led&#8217;s so you don&#8217;t have to use delays in your sketch.<\/h1>\n<h2>Click on video below for full tutorial!&#8230;&#8230;&#8230;<\/h2>\n<p><iframe loading=\"lazy\" title=\"Arduino, How to blink a LED without using delays in your sketch\" width=\"640\" height=\"360\" src=\"https:\/\/www.youtube.com\/embed\/OqiuS6AV_cI?feature=oembed\" frameborder=\"0\" allow=\"accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share\" referrerpolicy=\"strict-origin-when-cross-origin\" allowfullscreen><\/iframe><\/p>\n<h1><strong><a href=\"https:\/\/www.facebook.com\/zarduino\/\">Check us out on Facebook!<\/a><\/strong><\/h1>\n<p><a href=\"https:\/\/thezhut.com\/wp-content\/uploads\/2017\/02\/arduino_555_schem.jpg\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone wp-image-601\" src=\"https:\/\/thezhut.com\/wp-content\/uploads\/2017\/02\/arduino_555_schem.jpg?w=300\" alt=\"arduino_555_schem\" width=\"629\" height=\"365\" srcset=\"https:\/\/thezhut.com\/wp-content\/uploads\/2017\/02\/arduino_555_schem.jpg 1203w, https:\/\/thezhut.com\/wp-content\/uploads\/2017\/02\/arduino_555_schem-300x174.jpg 300w, https:\/\/thezhut.com\/wp-content\/uploads\/2017\/02\/arduino_555_schem-768x446.jpg 768w, https:\/\/thezhut.com\/wp-content\/uploads\/2017\/02\/arduino_555_schem-1024x595.jpg 1024w\" sizes=\"auto, (max-width: 629px) 100vw, 629px\" \/><\/a><\/p>\n<h1>Parts List:<\/h1>\n<p>#affiliate links#<\/p>\n<p><a href=\"https:\/\/www.amazon.com\/gp\/search\/ref=as_li_qf_sp_sr_il_tl?ie=UTF8&amp;tag=zhut01-20&amp;keywords=arduino board&amp;index=aps&amp;camp=1789&amp;creative=9325&amp;linkCode=xm2&amp;linkId=1023452d7dffd0cf62315fb18947657e\" target=\"_blank\" rel=\"noopener noreferrer\">ARDUINO Board<\/a><\/p>\n<p><a href=\"https:\/\/www.amazon.com\/gp\/search\/ref=as_li_qf_sp_sr_il_tl?ie=UTF8&amp;tag=zhut01-20&amp;keywords=arduino led&amp;index=aps&amp;camp=1789&amp;creative=9325&amp;linkCode=xm2&amp;linkId=746cfc4e06ac1032699ef83459616cac\" target=\"_blank\" rel=\"noopener noreferrer\">LED<\/a><\/p>\n<p><a href=\"https:\/\/www.amazon.com\/gp\/search\/ref=as_li_qf_sp_sr_il_tl?ie=UTF8&amp;tag=zhut01-20&amp;keywords=555 timer&amp;index=aps&amp;camp=1789&amp;creative=9325&amp;linkCode=xm2&amp;linkId=442bbb98a754571d915f328748986d90\">555 timer<\/a><\/p>\n<p><a href=\"https:\/\/www.amazon.com\/gp\/search\/ref=as_li_qf_sp_sr_il_tl?ie=UTF8&amp;tag=zhut01-20&amp;keywords=capacitor&amp;index=aps&amp;camp=1789&amp;creative=9325&amp;linkCode=xm2&amp;linkId=fb2844acc923e1a2e41ab4f8963256d7\" target=\"_blank\" rel=\"noopener noreferrer\">capacitors<\/a><\/p>\n<p><a href=\"https:\/\/www.amazon.com\/gp\/search\/ref=as_li_qf_sp_sr_il_tl?ie=UTF8&amp;tag=zhut01-20&amp;keywords=resistors&amp;index=aps&amp;camp=1789&amp;creative=9325&amp;linkCode=xm2&amp;linkId=12e39b714865fb05337fac8b25b8047e\" target=\"_blank\" rel=\"noopener noreferrer\">Resistors<\/a><\/p>\n<p><a href=\"https:\/\/www.amazon.com\/gp\/search\/ref=as_li_qf_sp_sr_il_tl?ie=UTF8&amp;tag=zhut01-20&amp;keywords=arduino jumper wires&amp;index=aps&amp;camp=1789&amp;creative=9325&amp;linkCode=xm2&amp;linkId=331f4a6b2cdb8eca336a818bb7fa2f40\" target=\"_blank\" rel=\"noopener noreferrer\">Jumper Wires<\/a><\/p>\n<p><a href=\"https:\/\/www.amazon.com\/gp\/search\/ref=as_li_qf_sp_sr_il_tl?ie=UTF8&amp;tag=zhut01-20&amp;keywords=arduino bread board&amp;index=aps&amp;camp=1789&amp;creative=9325&amp;linkCode=xm2&amp;linkId=26f79526b665e7569d45259820ebf097\" target=\"_blank\" rel=\"noopener noreferrer\">Bread Board<\/a><\/p>\n<h1><\/h1>\n<h1>THE Sketch I used in the tutorial:<\/h1>\n<p>#define photo (A1)<br \/>\n#define timer 11<br \/>\n#define b1 2<br \/>\nint photoVal;<br \/>\nint b1Val = 0;<\/p>\n<p>void setup() {<br \/>\npinMode (timer,OUTPUT);<br \/>\npinMode (b1,INPUT);<br \/>\n}<\/p>\n<p>void loop() {<br \/>\nb1Val = (digitalRead(b1));<br \/>\nif (b1Val == 1)<br \/>\n{<br \/>\ndelay(10);<br \/>\ndigitalWrite(timer,HIGH);<br \/>\nphotoVal = (analogRead(photo));<br \/>\nwhile (photoVal&gt;500)<br \/>\n{<br \/>\nphotoVal = (analogRead(photo));<br \/>\ndelay(1);<br \/>\n}<br \/>\ndigitalWrite(timer,LOW);<br \/>\n}<\/p>\n<p>}<\/p>\n","protected":false},"excerpt":{"rendered":"<p>This ARDUINO tutorial will show you how to use a 555 timer to blink led&#8217;s so you don&#8217;t have to use delays in your sketch. Click on video below for full tutorial!&#8230;&#8230;&#8230; Check us out on Facebook! Parts List: #affiliate &hellip; <a href=\"https:\/\/thezhut.com\/?page_id=598\">Continue reading <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":2,"featured_media":0,"parent":10,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"","meta":{"_monsterinsights_skip_tracking":false,"_monsterinsights_sitenote_active":false,"_monsterinsights_sitenote_note":"","_monsterinsights_sitenote_category":0,"footnotes":"","_links_to":"","_links_to_target":""},"class_list":["post-598","page","type-page","status-publish","hentry"],"_links":{"self":[{"href":"https:\/\/thezhut.com\/index.php?rest_route=\/wp\/v2\/pages\/598","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/thezhut.com\/index.php?rest_route=\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/thezhut.com\/index.php?rest_route=\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/thezhut.com\/index.php?rest_route=\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/thezhut.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=598"}],"version-history":[{"count":2,"href":"https:\/\/thezhut.com\/index.php?rest_route=\/wp\/v2\/pages\/598\/revisions"}],"predecessor-version":[{"id":1587,"href":"https:\/\/thezhut.com\/index.php?rest_route=\/wp\/v2\/pages\/598\/revisions\/1587"}],"up":[{"embeddable":true,"href":"https:\/\/thezhut.com\/index.php?rest_route=\/wp\/v2\/pages\/10"}],"wp:attachment":[{"href":"https:\/\/thezhut.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=598"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}