{"id":430,"date":"2016-09-06T23:40:55","date_gmt":"2016-09-06T23:40:55","guid":{"rendered":"http:\/\/blogs.ischool.berkeley.edu\/i262\/2016\/09\/06\/lab-01\/"},"modified":"2016-09-06T23:43:36","modified_gmt":"2016-09-06T23:43:36","slug":"lab-01","status":"publish","type":"post","link":"https:\/\/blogs.ischool.berkeley.edu\/i262\/2016\/09\/06\/lab-01\/","title":{"rendered":"Lab 01"},"content":{"rendered":"<h2>Description<\/h2>\n<div class=\"region region-content\">\n<div id=\"node-706\" class=\"node\">\n<p>I used Arduino with a red LED. I edited the sketch code to turn on the LED for 10 seconds and then off for 2 seconds. Uploaded the code and took pictures of the result.<\/p>\n<h2>Components<\/h2>\n<ul>\n<li>1 Arduino<\/li>\n<li>1 LED<\/li>\n<li>1 Resistor (220\u03a9)<\/li>\n<li>1 Breadboard<\/li>\n<\/ul>\n<h2>Code<\/h2>\n<pre class=\"content\" style=\"text-align: justify;\">\/*\r\n Blink\r\n Turns on an LED on for one second, then off for one second, repeatedly.\r\n\r\nMost Arduinos have an on-board LED you can control. On the Uno and\r\n Leonardo, it is attached to digital pin 13. If you're unsure what\r\n pin the on-board LED is connected to on your Arduino model, check\r\n the documentation at http:\/\/www.arduino.cc\r\n\r\nThis example code is in the public domain.\r\n\r\nmodified 8 May 2014\r\n by Scott Fitzgerald\r\n *\/\r\n\r\n\r\n\/\/ the setup function runs once when you press reset or power the board\r\nvoid setup() {\r\n \/\/ initialize digital pin 13 as an output.\r\n pinMode(13, OUTPUT);\r\n}\r\n\r\n\/\/ the loop function runs over and over again forever\r\nvoid loop() {\r\n digitalWrite(13, HIGH); \/\/ turn the LED on (HIGH is the voltage level)\r\n delay(10000); \/\/ wait for a second\r\n digitalWrite(13, LOW); \/\/ turn the LED off by making the voltage LOW\r\n delay(2000); \/\/ wait for a second\r\n}<\/pre>\n<\/div>\n<\/div>\n","protected":false},"excerpt":{"rendered":"<p>Description I used Arduino with a red LED. I edited the sketch code to turn on the LED for 10 seconds and then off for 2 seconds. Uploaded the code and took pictures of the result. Components 1 Arduino 1 &hellip; <a href=\"https:\/\/blogs.ischool.berkeley.edu\/i262\/2016\/09\/06\/lab-01\/\">Continue reading <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":2988,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[60082],"tags":[66683],"class_list":["post-430","post","type-post","status-publish","format-standard","hentry","category-lab1","tag-owen-w-hsiao"],"_links":{"self":[{"href":"https:\/\/blogs.ischool.berkeley.edu\/i262\/wp-json\/wp\/v2\/posts\/430","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/blogs.ischool.berkeley.edu\/i262\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blogs.ischool.berkeley.edu\/i262\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blogs.ischool.berkeley.edu\/i262\/wp-json\/wp\/v2\/users\/2988"}],"replies":[{"embeddable":true,"href":"https:\/\/blogs.ischool.berkeley.edu\/i262\/wp-json\/wp\/v2\/comments?post=430"}],"version-history":[{"count":0,"href":"https:\/\/blogs.ischool.berkeley.edu\/i262\/wp-json\/wp\/v2\/posts\/430\/revisions"}],"wp:attachment":[{"href":"https:\/\/blogs.ischool.berkeley.edu\/i262\/wp-json\/wp\/v2\/media?parent=430"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blogs.ischool.berkeley.edu\/i262\/wp-json\/wp\/v2\/categories?post=430"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blogs.ischool.berkeley.edu\/i262\/wp-json\/wp\/v2\/tags?post=430"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}