{"id":1498,"date":"2020-03-13T17:32:03","date_gmt":"2020-03-13T17:32:03","guid":{"rendered":"https:\/\/thezhut.com\/?page_id=1498"},"modified":"2020-03-13T17:38:24","modified_gmt":"2020-03-13T17:38:24","slug":"how-to-use-arrays-in-your-arduino-sketches","status":"publish","type":"page","link":"https:\/\/thezhut.com\/?page_id=1498","title":{"rendered":"How to use ARRAYS in your Arduino sketches"},"content":{"rendered":"<h1>Today we will take a look at the basic use of arrays in an Arduino sketch.<\/h1>\n<p><iframe loading=\"lazy\" title=\"How to use ARRAYS in your Arduino sketches\" width=\"640\" height=\"360\" src=\"https:\/\/www.youtube.com\/embed\/JbLR8lOVL5E?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<p>&nbsp;<\/p>\n<h1><strong>check us out on Facebook: <a href=\"https:\/\/www.facebook.com\/zarduino\/\" target=\"_blank\" rel=\"noopener noreferrer\">https:\/\/www.facebook.com\/zarduino\/<\/a><\/strong><\/h1>\n<p>&nbsp;<\/p>\n<h2><strong>SCHEMATIC:<\/strong><\/h2>\n<p>&nbsp;<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone wp-image-1499\" src=\"https:\/\/thezhut.com\/wp-content\/uploads\/2020\/03\/array_schematic_schem-300x182.png\" alt=\"\" width=\"638\" height=\"387\" srcset=\"https:\/\/thezhut.com\/wp-content\/uploads\/2020\/03\/array_schematic_schem-300x182.png 300w, https:\/\/thezhut.com\/wp-content\/uploads\/2020\/03\/array_schematic_schem-1024x623.png 1024w, https:\/\/thezhut.com\/wp-content\/uploads\/2020\/03\/array_schematic_schem-768x467.png 768w, https:\/\/thezhut.com\/wp-content\/uploads\/2020\/03\/array_schematic_schem.png 1194w\" sizes=\"auto, (max-width: 638px) 100vw, 638px\" \/><\/p>\n<h2><strong>ARDUINO CODE:<\/strong><\/h2>\n<p>int led[10] = {2, 3, 4, 5, 6, 8, 9, 10, 11, 12};<br \/>\nint del;<br \/>\nvoid setup()<br \/>\n{<br \/>\nfor (int i; i &lt;= 9; i++)<br \/>\n{<br \/>\npinMode(led[i], OUTPUT);<br \/>\n}<br \/>\n}<br \/>\nvoid loop() {<br \/>\ndel = analogRead (A1);<br \/>\ndel = map(del, 0, 1023, 10, 100);<br \/>\nfor (int i = 0; i &lt;= 9; i++)<br \/>\n{<br \/>\ndigitalWrite(led[i], HIGH);<br \/>\ndelay(del);<br \/>\n}<br \/>\ndelay(del * 4);<br \/>\nfor (int i = 9; i &gt;= 0; i&#8211;)<br \/>\n{<br \/>\ndigitalWrite(led[i], LOW);<br \/>\ndelay(del);<br \/>\n}<br \/>\ndelay(del * 4);<br \/>\n}<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Today we will take a look at the basic use of arrays in an Arduino sketch. &nbsp; check us out on Facebook: https:\/\/www.facebook.com\/zarduino\/ &nbsp; SCHEMATIC: &nbsp; ARDUINO CODE: int led[10] = {2, 3, 4, 5, 6, 8, 9, 10, 11, &hellip; <a href=\"https:\/\/thezhut.com\/?page_id=1498\">Continue reading <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"parent":1382,"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-1498","page","type-page","status-publish","hentry"],"_links":{"self":[{"href":"https:\/\/thezhut.com\/index.php?rest_route=\/wp\/v2\/pages\/1498","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\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/thezhut.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=1498"}],"version-history":[{"count":3,"href":"https:\/\/thezhut.com\/index.php?rest_route=\/wp\/v2\/pages\/1498\/revisions"}],"predecessor-version":[{"id":1502,"href":"https:\/\/thezhut.com\/index.php?rest_route=\/wp\/v2\/pages\/1498\/revisions\/1502"}],"up":[{"embeddable":true,"href":"https:\/\/thezhut.com\/index.php?rest_route=\/wp\/v2\/pages\/1382"}],"wp:attachment":[{"href":"https:\/\/thezhut.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=1498"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}