{"id":4146,"date":"2021-02-16T09:42:53","date_gmt":"2021-02-16T14:42:53","guid":{"rendered":"https:\/\/courses.ideate.cmu.edu\/16-376\/s2021\/?p=4146"},"modified":"2021-02-16T10:15:26","modified_gmt":"2021-02-16T15:15:26","slug":"class-5","status":"publish","type":"post","link":"https:\/\/courses.ideate.cmu.edu\/16-376\/s2021\/4146\/class-5\/","title":{"rendered":"Class 5: Circuit Playground"},"content":{"rendered":"\n<p>Tue. Feb 16, 2021, 10:30AM to 12:20PM (<a href=\"https:\/\/courses.ideate.cmu.edu\/16-376\/s2021\/zoom-meeting\/\" data-type=\"page\" data-id=\"3174\">Zoom<\/a>)<\/p>\n\n\n\n<p>Today&#8217;s class is primarily devoted to hands-on learning.<\/p>\n\n\n\n<h2>Warm-up<\/h2>\n\n\n\n<ol><li>Brief check-in. <\/li><li>Any questions?<\/li><\/ol>\n\n\n\n<h2>Administrative<\/h2>\n\n\n\n<ol><li>Did everyone successfully pick up a course kit (2 bags) from the campus store?<\/li><li>Did everyone successfully pick up a Bluefruit microcontroller from Hunt A9?<\/li><li>Did anyone install the <a href=\"https:\/\/codewith.mu\/\">mu Python editor software<\/a>?<\/li><\/ol>\n\n\n\n<h2>Assignment 4 Review<\/h2>\n\n\n\n<p>Let&#8217;s take about twenty minutes to discuss your results from <a href=\"https:\/\/courses.ideate.cmu.edu\/16-376\/s2021\/4037\/assignment-4\/\" data-type=\"post\" data-id=\"4037\">Assignment 4<\/a>.  Each group can briefly tell us:<\/p>\n\n\n\n<ol><li>What was your general scenario and approach?<\/li><li>What was the hardest rule to interpret in actual performance?<\/li><li>What was the most surprising feedback from the audience?<\/li><\/ol>\n\n\n\n<h2>Circuit Playground Bluefruit<\/h2>\n\n\n\n<p>The communication with our kinetic creations will be mediated using a wearable microcontroller to measure sensors, operate actuators, and communicate with a laptop using either wired USB or wireless Bluetooth. Today&#8217;s objective is to help you get started with the tools.<\/p>\n\n\n\n<p>We will generally be following the hardware notes from the course technical guide: <a href=\"https:\/\/courses.ideate.cmu.edu\/16-376\/s2021\/ref\/text\/hardware\/cpb.html\">Adafruit Circuit Playground Bluefruit<\/a>. But we&#8217;ll go step by step at a novice level so no one gets left behind.<\/p>\n\n\n\n<h3>Downloads<\/h3>\n\n\n\n<p>We have cached copies of the installer files we will be using in a Google Drive folder  <a href=\"https:\/\/drive.google.com\/drive\/folders\/1BkeIOqn4z2iMxCuz8aZeNGlR95ipEG8G?usp=sharing\">KF-S21-CPB-Downloads<\/a>.  Please take a moment to copy those to your computer.<\/p>\n\n\n\n<p>If you have not already installed the <a href=\"https:\/\/codewith.mu\/\">mu Python editor<\/a>, please also download that now and run the installer.<\/p>\n\n\n\n<h3>Live Demo<\/h3>\n\n\n\n<p>We first want to give you a quick preview of the end goal for the day.<\/p>\n\n\n\n<ol><li>touch-sensitive light demo<\/li><li>mu editor<\/li><li>editing\/running code<\/li><li>interacting directly with the Python system<\/li><\/ol>\n\n\n\n<h3>Setting Up Your Hardware<\/h3>\n\n\n\n<p>The Circuit Playground Bluefruit will need to have the CircuitPython system installed before we can program it.  We will only need to do this once.<\/p>\n\n\n\n<ol><li>connecting the board<\/li><li>installing the firmware<\/li><li>testing using mu &#8216;Serial&#8217;, the read-eval-print loop (REPL) window<br><code>2+2<\/code><br><code>3**201<\/code><br><code>import time<\/code><br><code>time.monotonic()<\/code><br><code>help('modules')<\/code><br><\/li><li>installing the libraries<\/li><li>testing the library<br><code>from adafruit_circuitplayground import cp<\/code><br><code>cp.red_led = True<\/code><br><code>cp.play_tone(440, 1.0)<\/code><br><\/li><li>trying out <a href=\"https:\/\/courses.ideate.cmu.edu\/16-376\/s2021\/ref\/text\/code\/cpb-intro.html\">sample code<\/a><\/li><\/ol>\n\n\n\n<h3>Next Steps<\/h3>\n\n\n\n<p>CircuitPython lets you treat the microcontroller like a tiny data drive.  Your code can be edited in-place, and saving will run it.  But you&#8217;ll need to work out a plan for copying final programs back to your computer for your documentation.<\/p>\n\n\n\n<ol><li>editing code in place<\/li><li>saving programs back to your computer<\/li><li>exploring the Adafruit tutorials<\/li><li>exploring the library documentation<\/li><\/ol>\n\n\n\n<h2>Assignment<\/h2>\n\n\n\n<ol><li>Please install Python 3.8 on your computer with additional packages as per the course <a href=\"https:\/\/courses.ideate.cmu.edu\/16-376\/s2021\/ref\/text\/resources\/Python.html\">Python 3 Installation<\/a> guide.<\/li><li>Spend an hour going through the Adafruit tutorial starting with <a href=\"https:\/\/learn.adafruit.com\/circuitpython-made-easy-on-circuit-playground-express\/red-led\">Red LED<\/a>.  Please go at your own pace and feel free to skip around.  The objective is become more comfortable with the board and basic CircuitPython.<\/li><li>Post a very brief progress report (a sentence or two) to indicate what tutorials you tested and any problems that arose.<\/li><\/ol>\n","protected":false},"excerpt":{"rendered":"<p>Tue. Feb 16, 2021, 10:30AM to 12:20PM (Zoom) Today&#8217;s class is primarily devoted to hands-on learning. Warm-up Brief check-in. Any questions? Administrative Did everyone successfully pick up a&#8230;<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":[],"categories":[10],"tags":[],"_links":{"self":[{"href":"https:\/\/courses.ideate.cmu.edu\/16-376\/s2021\/wp-json\/wp\/v2\/posts\/4146"}],"collection":[{"href":"https:\/\/courses.ideate.cmu.edu\/16-376\/s2021\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/courses.ideate.cmu.edu\/16-376\/s2021\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/courses.ideate.cmu.edu\/16-376\/s2021\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/courses.ideate.cmu.edu\/16-376\/s2021\/wp-json\/wp\/v2\/comments?post=4146"}],"version-history":[{"count":14,"href":"https:\/\/courses.ideate.cmu.edu\/16-376\/s2021\/wp-json\/wp\/v2\/posts\/4146\/revisions"}],"predecessor-version":[{"id":4200,"href":"https:\/\/courses.ideate.cmu.edu\/16-376\/s2021\/wp-json\/wp\/v2\/posts\/4146\/revisions\/4200"}],"wp:attachment":[{"href":"https:\/\/courses.ideate.cmu.edu\/16-376\/s2021\/wp-json\/wp\/v2\/media?parent=4146"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/courses.ideate.cmu.edu\/16-376\/s2021\/wp-json\/wp\/v2\/categories?post=4146"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/courses.ideate.cmu.edu\/16-376\/s2021\/wp-json\/wp\/v2\/tags?post=4146"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}