{"id":115,"date":"2017-07-11T22:55:12","date_gmt":"2017-07-11T22:55:12","guid":{"rendered":"http:\/\/digm.drexel.edu\/uxid\/?p=115"},"modified":"2018-03-18T18:24:03","modified_gmt":"2018-03-18T18:24:03","slug":"arduino-week-01","status":"publish","type":"post","link":"https:\/\/philsinatra.net\/branches\/uxid\/2017\/07\/11\/arduino-week-01\/","title":{"rendered":"Arduino Week 01"},"content":{"rendered":"<p>This week we started digging into the Arduino Starter Kit. Our initial move was to write code to make the on board LED flash to understand the core concept of the Arduino IDE and the associate programming language. The Arduino is a simple microcontroller that was created for\u00a0building digital devices and interactive objects that can sense and control objects in the physical world. The programs written in the Arduino IDE are called <em>Sketches<\/em> that are later compiled to\u00a0binary machine code for the Arduino processor. The basic setup of a sketch contains two functions; the setup and the loop.<\/p>\n<p><img loading=\"lazy\" class=\"aligncenter size-full wp-image-80\" src=\"http:\/\/tfinamore.com\/wp-content\/uploads\/2017\/07\/Screen-Shot-2017-07-12-at-11.46.48-AM-1.png\" alt=\"\" width=\"512\" height=\"571\" \/><\/p>\n<p>The setup function runs only when the arduino is powered on and is used to configure the digital pins and load any libraries or define global variables as needed for the sketch. The loop function runs continually after the setup is complete and contains the arguments that will be the foundation of the sketch. The final code that makes the onboard<\/p>\n<p><img loading=\"lazy\" class=\"aligncenter size-full wp-image-81\" src=\"http:\/\/tfinamore.com\/wp-content\/uploads\/2017\/07\/Screen-Shot-2017-07-12-at-11.46.13-AM.png\" alt=\"\" width=\"785\" height=\"939\" \/><\/p>\n<p>We then proceeded to wire an electrical circuit using an LED, 200\u03a9 resistor, push button, and a solderless breadboard. This requires no code as it is a simple circuit.<\/p>\n<p>Then, to put this all together, we completed <a href=\"https:\/\/www.arduino.cc\/en\/ArduinoStarterKit\/Prj02\">Project 02: Spaceship Interface<\/a>. The basic idea is that the arduino will turn on the green LED, but if the button is pressed it will turn off the green LED and alternate between the two red LEDs.<\/p>\n<figure class=\"wp-block-embed wp-block-embed-youtube is-type-video is-provider-youtube\"><div class=\"wp-block-embed__wrapper\"><iframe  id=\"_ytid_55800\"  width=\"326\" height=\"183\"  data-origwidth=\"326\" data-origheight=\"183\" src=\"https:\/\/www.youtube.com\/embed\/lYlHOuyJYe4?enablejsapi=1&autoplay=0&cc_load_policy=0&cc_lang_pref=&iv_load_policy=1&loop=0&modestbranding=0&rel=1&fs=1&playsinline=0&autohide=2&theme=dark&color=red&controls=1&\" class=\"__youtube_prefs__  no-lazyload\" title=\"YouTube player\"  allow=\"accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture\" allowfullscreen data-no-lazy=\"1\" data-skipgform_ajax_framebjll=\"\"><\/iframe><\/div><\/figure>\n<p>Once we had this working we played with the code to change the timing and functionality of the sketch.<\/p>\n<p>Before next week each student will be required to complete Project 03: Love-o-Meter to measure how hot-blooded they are.This project utilizes a TMP36 temperature sensor to measure how warm skin is. The setup code sets the baseline temperature for the room, then in the loop it check the temperature being collected by the sensor, as the temperature increases\/decreases additional LEDs are turned on\/off. So if you hold the sensor, as your body temperature increases the temperature the sensor is collecting, you will see the LEDs light up in sequence.<\/p>\n<figure class=\"wp-block-embed wp-block-embed-youtube is-type-video is-provider-youtube\"><div class=\"wp-block-embed__wrapper\"><iframe  id=\"_ytid_36670\"  width=\"326\" height=\"183\"  data-origwidth=\"326\" data-origheight=\"183\" src=\"https:\/\/www.youtube.com\/embed\/jXBjyKztVN8?enablejsapi=1&autoplay=0&cc_load_policy=0&cc_lang_pref=&iv_load_policy=1&loop=0&modestbranding=0&rel=1&fs=1&playsinline=0&autohide=2&theme=dark&color=red&controls=1&\" class=\"__youtube_prefs__  no-lazyload\" title=\"YouTube player\"  allow=\"accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture\" allowfullscreen data-no-lazy=\"1\" data-skipgform_ajax_framebjll=\"\"><\/iframe><\/div><\/figure>\n<p>Next week in class we will work on Project\u00a004\u00a0Color Mixing Lamp to produce any color with a lamp that uses light as an input and Project\u00a005\u00a0Mood Cue to clue people in to how they are doing.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>This week we started digging into the Arduino Starter Kit. Our initial move was to write code to make the on board LED flash to understand the core concept of the Arduino IDE and the associate programming language. The Arduino is a simple microcontroller that was created for\u00a0building digital devices &hellip;<\/p>\n","protected":false},"author":2,"featured_media":116,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":[],"categories":[5],"tags":[21],"_links":{"self":[{"href":"https:\/\/philsinatra.net\/branches\/uxid\/wp-json\/wp\/v2\/posts\/115"}],"collection":[{"href":"https:\/\/philsinatra.net\/branches\/uxid\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/philsinatra.net\/branches\/uxid\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/philsinatra.net\/branches\/uxid\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/philsinatra.net\/branches\/uxid\/wp-json\/wp\/v2\/comments?post=115"}],"version-history":[{"count":1,"href":"https:\/\/philsinatra.net\/branches\/uxid\/wp-json\/wp\/v2\/posts\/115\/revisions"}],"predecessor-version":[{"id":117,"href":"https:\/\/philsinatra.net\/branches\/uxid\/wp-json\/wp\/v2\/posts\/115\/revisions\/117"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/philsinatra.net\/branches\/uxid\/wp-json\/wp\/v2\/media\/116"}],"wp:attachment":[{"href":"https:\/\/philsinatra.net\/branches\/uxid\/wp-json\/wp\/v2\/media?parent=115"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/philsinatra.net\/branches\/uxid\/wp-json\/wp\/v2\/categories?post=115"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/philsinatra.net\/branches\/uxid\/wp-json\/wp\/v2\/tags?post=115"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}