{"id":1531,"date":"2020-10-07T00:11:31","date_gmt":"2020-10-07T04:11:31","guid":{"rendered":"https:\/\/courses.ideate.cmu.edu\/48-339\/f2020\/?p=1531"},"modified":"2020-10-08T17:06:37","modified_gmt":"2020-10-08T21:06:37","slug":"class-notes-7-oct-2020","status":"publish","type":"post","link":"https:\/\/courses.ideate.cmu.edu\/48-339\/f2020\/?p=1531","title":{"rendered":"Class notes, 6 Oct 2020"},"content":{"rendered":"<p><strong>Haptic\/touch vs. objects moving in space<\/strong><\/p>\n<p>touching a person vs. moving an object<\/p>\n<p>person presses a button vs. wind blowing a windmill<\/p>\n<p>touching a person vs. moving an object \u2013 touch is more personal, requires little energy.<\/p>\n<p>Touch can be wrapped in a robotic device, ex: <a href=\"https:\/\/en.wikipedia.org\/wiki\/Paro_(robot)\">Paro (wiki)<\/a> <a href=\"https:\/\/www.youtube.com\/watch?v=oJq5PQZHU-I\">trade show demo.<\/a><\/p>\n<p>Moving things typically requires an external power source, Arduino can only provide 5V at a few milliamps.<\/p>\n<p>energy required to move large things vs. small things<\/p>\n<p>explain watts vs. amps vs voltage vs. movement<\/p>\n<p>For moving things, use basic physics<\/p>\n<ul>\n<li>gears \u2014 <a href=\"https:\/\/engineerdog.com\/2017\/01\/07\/a-practical-guide-to-fdm-3d-printing-gears\/\">FAQ on 3d printing gears<\/a><\/li>\n<li>levers \u2014 drive a lever with a solenoid, transfer short movement to long<\/li>\n<li>pulleys \u2013 drive with DC motors or stepper<\/li>\n<\/ul>\n<h2><strong>Input classification, serial communication, interrupts.<\/strong><\/h2>\n<p><strong>Types of Input<\/strong><\/p>\n<p>monophonic + skill: wind instruments, percussion<\/p>\n<p>polyphonic + tech: keyboards, pianos, organs, strings<br \/>\nanthropomorphic: respond to human condition, blood pressure, galvanic skin, breath rate, pulse rate, visual interpretation of secondary movements: eye twitch, touching your face, blinking<\/p>\n<p>\u201crapid eye movement\u201d when eyes are closed, used in PTSD therapy called &#8220;EMDR&#8221;:<\/p>\n<p>https:\/\/en.wikipedia.org\/wiki\/Eye_movement_desensitization_and_reprocessing<\/p>\n<p>SparkFun biometric sensors: https:\/\/www.sparkfun.com\/categories\/146<\/p>\n<p>UPMC lobby temperature check: \u00a0<a href=\"https:\/\/courses.ideate.cmu.edu\/48-339\/f2020\/wp-content\/uploads\/2020\/10\/upmc-lobby-temperature-check.mov\">upmc-lobby-temperature-check<\/a><\/p>\n<h3><strong>Serial Communication<\/strong><\/h3>\n<p>SPI\/I2C and complex communications protocols<br \/>\nHow we get complex data from sensors \u2013 a lot of this is hidden in libraries<br \/>\nUnique IDs<br \/>\nSimple controls for complex output: neopixel<br \/>\nSparkFun\u2019s version: <a href=\"https:\/\/www.sparkfun.com\/qwiic\">Qwiic<\/a><\/p>\n<h3><strong>Interrupts<\/strong><\/h3>\n<p>Show examples of interrupt code in the environment<br \/>\nswitches on mobiles<br \/>\nremote controls for the projectors, TVs, stereos<br \/>\nlittle to no latency<br \/>\ncomplex interrupt systems in video game controllers<br \/>\nrotary encoder (we\u2019ll do a demo later in the semester)<br \/>\nfor now, we only use digital inputs for interrupts<\/p>\n<p>Code samples, show how an interrupt can be used to toggle a state by one increment compared to holding down a switch and falling through a number of states.<br \/>\nNote that holding down the switch means the interrupt service routine (ISR) only functions once<br \/>\nCompare to using delay() to sample data every so many units of time.<\/p>\n<p>Use an interrupt to stop a task that takes a long time, say a long for() or while() loop, by adjusting the terminating conditions<\/p>\n<p>Question: What if you were playing mp3 files or video, how would you use interrupts as part of the interface?<\/p>\n<p>zip file with some examples:\u00a0 <a href=\"https:\/\/courses.ideate.cmu.edu\/48-339\/f2020\/wp-content\/uploads\/2020\/10\/interrupts-1-pot.zip\">interrupts-1-pot<\/a><\/p>\n<h2><\/h2>\n","protected":false},"excerpt":{"rendered":"<p>Haptic\/touch vs. objects moving in space touching a person vs. moving an object person presses a button vs. wind blowing a windmill touching a person vs. moving an object \u2013 touch is more personal, requires little energy. Touch can be wrapped in a robotic device, ex: Paro (wiki) trade show demo. Moving things typically requires &hellip; <a href=\"https:\/\/courses.ideate.cmu.edu\/48-339\/f2020\/?p=1531\" class=\"more-link\">Continue reading<span class=\"screen-reader-text\"> &#8220;Class notes, 6 Oct 2020&#8221;<\/span><\/a><\/p>\n","protected":false},"author":3,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":[],"categories":[3],"tags":[],"_links":{"self":[{"href":"https:\/\/courses.ideate.cmu.edu\/48-339\/f2020\/index.php?rest_route=\/wp\/v2\/posts\/1531"}],"collection":[{"href":"https:\/\/courses.ideate.cmu.edu\/48-339\/f2020\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/courses.ideate.cmu.edu\/48-339\/f2020\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/courses.ideate.cmu.edu\/48-339\/f2020\/index.php?rest_route=\/wp\/v2\/users\/3"}],"replies":[{"embeddable":true,"href":"https:\/\/courses.ideate.cmu.edu\/48-339\/f2020\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=1531"}],"version-history":[{"count":4,"href":"https:\/\/courses.ideate.cmu.edu\/48-339\/f2020\/index.php?rest_route=\/wp\/v2\/posts\/1531\/revisions"}],"predecessor-version":[{"id":1538,"href":"https:\/\/courses.ideate.cmu.edu\/48-339\/f2020\/index.php?rest_route=\/wp\/v2\/posts\/1531\/revisions\/1538"}],"wp:attachment":[{"href":"https:\/\/courses.ideate.cmu.edu\/48-339\/f2020\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=1531"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/courses.ideate.cmu.edu\/48-339\/f2020\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=1531"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/courses.ideate.cmu.edu\/48-339\/f2020\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=1531"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}