{"id":14,"date":"2012-07-15T12:58:00","date_gmt":"2012-07-15T12:58:00","guid":{"rendered":"http:\/\/192.168.0.199:8000\/?p=12"},"modified":"2023-01-17T15:06:12","modified_gmt":"2023-01-17T14:06:12","slug":"prvni-pokusy-running-led-light","status":"publish","type":"post","link":"https:\/\/loudat.cz\/kublog\/2012\/07\/15\/prvni-pokusy-running-led-light\/","title":{"rendered":"Prvn\u00ed pokusy &#8211; running LED light"},"content":{"rendered":"<p>V &#8222;kouzeln\u00e9m&#8220;, cca 20 let neotev\u0159en\u00e9m \u0161upl\u00edku, jsem na\u0161el n\u011bjak\u00e9 LEDky a dal\u0161\u00ed sou\u010d\u00e1stky, v jedin\u00e9m \u0161ikovn\u00e9m obchod\u011b v \u010c. Bud\u011bjovic\u00edch jsem koupil nep\u00e1jiv\u00e9 pole a u\u017e mi nic nebr\u00e1nilo v dal\u0161\u00edm zkoum\u00e1n\u00ed Arduina.<\/p>\n\n\n<p>Po povinn\u00e9m rozblik\u00e1n\u00ed jedn\u00e9 LEDky na t\u0159in\u00e1ct\u00e9m pinu pomoc\u00ed programu Blink jsem tento upravil pro osm LEDek a v\u00fdsledek je zde:<\/p>\n\n\n\n<pre class=\"wp-block-prismatic-blocks\"><code class=\"\" data-line=\"\">int led1 = 13;\nint led2 = 12;\nint led3 = 11;\nint led4 = 10;\nint led5 = 9;\nint led6 = 8;\nint led7 = 7;\nint led8 = 6;\nint pause = 100;\n\n\/\/ the setup routine runs once when you press reset:\nvoid setup() { \/\/ initialize the digital pins as an outputs.\npinMode(led1, OUTPUT);\npinMode(led2, OUTPUT);\npinMode(led3, OUTPUT);\npinMode(led4, OUTPUT);\npinMode(led5, OUTPUT);\npinMode(led6, OUTPUT);\npinMode(led7, OUTPUT);\npinMode(led8, OUTPUT); }\n\/\/ the loop routine runs over and over again forever:\nvoid loop() {\ndigitalWrite(led1, HIGH); \/\/ turn the LED on\ndigitalWrite(led2, LOW); \/\/ turn the LED off\ndelay(pause); \/\/ wait for a setup time\ndigitalWrite(led2, HIGH); \/\/ turn the LED on\ndigitalWrite(led1, LOW); \/\/ turn the LED off\ndelay(pause); \/\/ wait for a setup time\ndigitalWrite(led3, HIGH); \/\/ turn the LED on\ndigitalWrite(led2, LOW); \/\/ turn the LED off\ndelay(pause); \/\/ wait for a setup time\ndigitalWrite(led4, HIGH); \/\/ turn the LED on\ndigitalWrite(led3, LOW); \/\/ turn the LED off\ndelay(pause); \/\/ wait for a setup time\ndigitalWrite(led5, HIGH); \/\/ turn the LED on\ndigitalWrite(led4, LOW); \/\/ turn the LED off\ndelay(pause); \/\/ wait for a setup time\ndigitalWrite(led6, HIGH); \/\/ turn the LED on\ndigitalWrite(led5, LOW); \/\/ turn the LED off\ndelay(pause); \/\/ wait for a setup time\ndigitalWrite(led7, HIGH); \/\/ turn the LED on\ndigitalWrite(led6, LOW); \/\/ turn the LED off\ndelay(pause); \/\/ wait for a setup time\ndigitalWrite(led8, HIGH); \/\/ turn the LED on\ndigitalWrite(led7, LOW); \/\/ turn the LED off\ndelay(pause); \/\/ wait for a setup time\ndigitalWrite(led7, HIGH); \/\/ turn the LED on\ndigitalWrite(led8, LOW); \/\/ turn the LED off\ndelay(pause); \/\/ wait for a setup time\ndigitalWrite(led6, HIGH); \/\/ turn the LED on\ndigitalWrite(led7, LOW); \/\/ turn the LED off\ndelay(pause); \/\/ wait for a setup time\ndigitalWrite(led5, HIGH); \/\/ turn the LED on\ndigitalWrite(led6, LOW); \/\/ turn the LED off\ndelay(pause); \/\/ wait for a setup time\ndigitalWrite(led4, HIGH); \/\/ turn the LED on\ndigitalWrite(led5, LOW); \/\/ turn the LED off\ndelay(pause); \/\/ wait for a setup time\ndigitalWrite(led3, HIGH); \/\/ turn the LED on\ndigitalWrite(led4, LOW); \/\/ turn the LED off\ndelay(pause); \/\/ wait for a setup time\ndigitalWrite(led2, HIGH); \/\/ turn the LED on\ndigitalWrite(led3, LOW); \/\/ turn the LED off\ndelay(pause); \/\/ wait for a setup time\ndigitalWrite(led1, HIGH); \/\/ turn the LED on\ndigitalWrite(led2, LOW); \/\/ turn the LED off\ndelay(pause); \/\/ wait for a setup time\ndigitalWrite(led1, HIGH); \/\/ turn the LED on\ndelay(pause); \/\/ wait for a setup time\ndigitalWrite(led2, HIGH); \/\/ turn the LED on\ndelay(pause); \/\/ wait for a setup time\ndigitalWrite(led3, HIGH); \/\/ turn the LED on\ndelay(pause); \/\/ wait for a setup time\ndigitalWrite(led4, HIGH); \/\/ turn the LED on\ndelay(pause); \/\/ wait for a setup time\ndigitalWrite(led5, HIGH); \/\/ turn the LED on\ndelay(pause); \/\/ wait for a setup time\ndigitalWrite(led6, HIGH); \/\/ turn the LED on\ndelay(pause); \/\/ wait for a setup time\ndigitalWrite(led7, HIGH); \/\/ turn the LED on\ndelay(pause); \/\/ wait for a setup time\ndigitalWrite(led8, HIGH); \/\/ turn the LED on\ndelay(pause); \/\/ wait for a setup time\ndigitalWrite(led8, LOW); \/\/ turn the LED off\ndelay(pause); \/\/ wait for a setup time\ndigitalWrite(led7, LOW); \/\/ turn the LED off\ndelay(pause); \/\/ wait for a setup time\ndigitalWrite(led6, LOW); \/\/ turn the LED off\ndelay(pause); \/\/ wait for a setup time\ndigitalWrite(led5, LOW); \/\/ turn the LED off\ndelay(pause); \/\/ wait for a setup time\ndigitalWrite(led4, LOW); \/\/ turn the LED off\ndelay(pause); \/\/ wait for a setup time\ndigitalWrite(led3, LOW); \/\/ turn the LED off\ndelay(pause); \/\/ wait for a setup time\ndigitalWrite(led2, LOW); \/\/ turn the LED off\ndelay(pause); \/\/ wait for a setup time\ndigitalWrite(led1, LOW); \/\/ turn the LED off\ndelay(pause); \/\/ wait for a setup }<\/code><\/pre>\n","protected":false},"excerpt":{"rendered":"<p>V &#8222;kouzeln\u00e9m&#8220;, cca 20 let neotev\u0159en\u00e9m \u0161upl\u00edku, jsem na\u0161el n\u011bjak\u00e9 LEDky a dal\u0161\u00ed sou\u010d\u00e1stky, v jedin\u00e9m \u0161ikovn\u00e9m obchod\u011b v \u010c. Bud\u011bjovic\u00edch jsem koupil nep\u00e1jiv\u00e9 pole a u\u017e mi nic nebr\u00e1nilo&#8230;<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_monsterinsights_skip_tracking":false,"_monsterinsights_sitenote_active":false,"_monsterinsights_sitenote_note":"","_monsterinsights_sitenote_category":0,"footnotes":""},"categories":[10],"tags":[],"class_list":["post-14","post","type-post","status-publish","format-standard","hentry","category-arduino"],"_links":{"self":[{"href":"https:\/\/loudat.cz\/kublog\/wp-json\/wp\/v2\/posts\/14","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/loudat.cz\/kublog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/loudat.cz\/kublog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/loudat.cz\/kublog\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/loudat.cz\/kublog\/wp-json\/wp\/v2\/comments?post=14"}],"version-history":[{"count":3,"href":"https:\/\/loudat.cz\/kublog\/wp-json\/wp\/v2\/posts\/14\/revisions"}],"predecessor-version":[{"id":855,"href":"https:\/\/loudat.cz\/kublog\/wp-json\/wp\/v2\/posts\/14\/revisions\/855"}],"wp:attachment":[{"href":"https:\/\/loudat.cz\/kublog\/wp-json\/wp\/v2\/media?parent=14"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/loudat.cz\/kublog\/wp-json\/wp\/v2\/categories?post=14"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/loudat.cz\/kublog\/wp-json\/wp\/v2\/tags?post=14"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}