{"id":4965,"date":"2021-04-07T23:13:34","date_gmt":"2021-04-08T03:13:34","guid":{"rendered":"https:\/\/courses.ideate.cmu.edu\/16-376\/s2021\/?p=4965"},"modified":"2021-04-08T10:30:08","modified_gmt":"2021-04-08T14:30:08","slug":"project-1-team-pom-pom","status":"publish","type":"post","link":"https:\/\/courses.ideate.cmu.edu\/16-376\/s2021\/4965\/project-1-team-pom-pom\/","title":{"rendered":"Project 1: Team Pom Pom"},"content":{"rendered":"\n<p>by Celia Kasberg, Helen Yu, and Elle Smith<\/p>\n\n\n\n<h4>Premise<\/h4>\n\n\n\n<p>One of the things lost in remote classes and virtual meetings is the subconcious life of the people around you. From foot taps to occasional sighs,  big stretches to verbal &#8220;loading sounds&#8221;,  and pencil taps to chair jitters. Team Pom Pom telematically reanimates the subconscious character with articulate twirling pom pom creatures that jingle with every remote movement. <\/p>\n\n\n\n<h4>Ambient Telematic Wind Chimes<\/h4>\n\n\n\n<figure class=\"wp-block-embed is-type-video is-provider-youtube wp-block-embed-youtube wp-embed-aspect-16-9 wp-has-aspect-ratio\"><div class=\"wp-block-embed__wrapper\">\n<iframe loading=\"lazy\" title=\"Team Pom Pom - Project 1\" width=\"620\" height=\"349\" src=\"https:\/\/www.youtube.com\/embed\/MFo_lxKL-Aw?feature=oembed\" frameborder=\"0\" allow=\"accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture\" allowfullscreen><\/iframe>\n<\/div><\/figure>\n\n\n\n<p class=\"has-text-align-center has-accent-color has-text-color\"><em> <\/em><\/p>\n\n\n\n<div class=\"wp-block-columns\">\n<div class=\"wp-block-column\">\n<figure class=\"wp-block-image size-large is-style-default\"><img loading=\"lazy\" width=\"765\" height=\"1020\" src=\"https:\/\/courses.ideate.cmu.edu\/16-376\/s2021\/wp-content\/uploads\/2021\/04\/2021-04-06-1-2-edited.jpg\" alt=\"\" class=\"wp-image-4978\" srcset=\"https:\/\/courses.ideate.cmu.edu\/16-376\/s2021\/wp-content\/uploads\/2021\/04\/2021-04-06-1-2-edited.jpg 765w, https:\/\/courses.ideate.cmu.edu\/16-376\/s2021\/wp-content\/uploads\/2021\/04\/2021-04-06-1-2-edited-225x300.jpg 225w, https:\/\/courses.ideate.cmu.edu\/16-376\/s2021\/wp-content\/uploads\/2021\/04\/2021-04-06-1-2-edited-508x677.jpg 508w\" sizes=\"(max-width: 765px) 100vw, 765px\" \/><figcaption>Helen&#8217;s Wind Chimes<\/figcaption><\/figure>\n<\/div>\n\n\n\n<div class=\"wp-block-column\">\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" width=\"768\" height=\"1024\" src=\"https:\/\/courses.ideate.cmu.edu\/16-376\/s2021\/wp-content\/uploads\/2021\/04\/Pom-Poms-2-768x1024.jpg\" alt=\"\" class=\"wp-image-5016\" srcset=\"https:\/\/courses.ideate.cmu.edu\/16-376\/s2021\/wp-content\/uploads\/2021\/04\/Pom-Poms-2-768x1024.jpg 768w, https:\/\/courses.ideate.cmu.edu\/16-376\/s2021\/wp-content\/uploads\/2021\/04\/Pom-Poms-2-225x300.jpg 225w, https:\/\/courses.ideate.cmu.edu\/16-376\/s2021\/wp-content\/uploads\/2021\/04\/Pom-Poms-2-1152x1536.jpg 1152w, https:\/\/courses.ideate.cmu.edu\/16-376\/s2021\/wp-content\/uploads\/2021\/04\/Pom-Poms-2-1536x2048.jpg 1536w, https:\/\/courses.ideate.cmu.edu\/16-376\/s2021\/wp-content\/uploads\/2021\/04\/Pom-Poms-2-973x1297.jpg 973w, https:\/\/courses.ideate.cmu.edu\/16-376\/s2021\/wp-content\/uploads\/2021\/04\/Pom-Poms-2-508x677.jpg 508w, https:\/\/courses.ideate.cmu.edu\/16-376\/s2021\/wp-content\/uploads\/2021\/04\/Pom-Poms-2-scaled.jpg 1920w\" sizes=\"(max-width: 768px) 100vw, 768px\" \/><figcaption>Elle&#8217;s Wind Chimes<\/figcaption><\/figure>\n<\/div>\n\n\n\n<div class=\"wp-block-column\">\n<figure class=\"wp-block-image size-large is-style-default\"><img loading=\"lazy\" width=\"768\" height=\"1024\" src=\"https:\/\/courses.ideate.cmu.edu\/16-376\/s2021\/wp-content\/uploads\/2021\/04\/Celias-Wind-Chimes-1-768x1024.jpg\" alt=\"\" class=\"wp-image-4987\" srcset=\"https:\/\/courses.ideate.cmu.edu\/16-376\/s2021\/wp-content\/uploads\/2021\/04\/Celias-Wind-Chimes-1-768x1024.jpg 768w, https:\/\/courses.ideate.cmu.edu\/16-376\/s2021\/wp-content\/uploads\/2021\/04\/Celias-Wind-Chimes-1-225x300.jpg 225w, https:\/\/courses.ideate.cmu.edu\/16-376\/s2021\/wp-content\/uploads\/2021\/04\/Celias-Wind-Chimes-1-1152x1536.jpg 1152w, https:\/\/courses.ideate.cmu.edu\/16-376\/s2021\/wp-content\/uploads\/2021\/04\/Celias-Wind-Chimes-1-1536x2048.jpg 1536w, https:\/\/courses.ideate.cmu.edu\/16-376\/s2021\/wp-content\/uploads\/2021\/04\/Celias-Wind-Chimes-1-973x1297.jpg 973w, https:\/\/courses.ideate.cmu.edu\/16-376\/s2021\/wp-content\/uploads\/2021\/04\/Celias-Wind-Chimes-1-508x677.jpg 508w, https:\/\/courses.ideate.cmu.edu\/16-376\/s2021\/wp-content\/uploads\/2021\/04\/Celias-Wind-Chimes-1-scaled.jpg 1920w\" sizes=\"(max-width: 768px) 100vw, 768px\" \/><figcaption>Celia&#8217;s Wind Chimes<\/figcaption><\/figure>\n<\/div>\n<\/div>\n\n\n\n<div class=\"wp-block-columns\">\n<div class=\"wp-block-column\" style=\"flex-basis:100%\">\n<div class=\"wp-block-group\"><div class=\"wp-block-group__inner-container\">\n<h4><strong>Reflection<\/strong><\/h4>\n\n\n\n<p>By embedding the concept of kitsch through the use of crafty pom poms, beads, and bells, we were able to create individualized wind chimes that reflected our personalities and help us connect with one another. Making the pom poms different sizes and having the pendulums at varied lengths allowed for each set of wind chimes to create a different spin pattern and add a happy and cheerful element to this project. Altogether, these wind chimes offered both a visual and auditory presence which connected us through ambient proxy motion! <\/p>\n<\/div><\/div>\n<\/div>\n<\/div>\n\n\n\n<h4>Code <\/h4>\n\n\n<pre class=\"brush: python; title: ; notranslate\" title=\"\">\n&quot;&quot;&quot;\nProject 1: Ambient Proxy Body\n\nTeam Pom Pom\nHelen Yu (heleny1), Celia Kasberg (ckasberg), Elle Smith\n\nWritten by Helen Yu\nLast Updated: 4\/6\/21\n\nSummary: As your partner fidgets in their chair, your wind chimes spin\nin reaction to your partner's presence. Small and slow movements trigger\na sweeping motion in the servo. Fast and sharp movements trigger a stepping\nsweep in the servo.\n\nInputs: Accelerometer\nOutputs: Hobby Servo on SD A5\n&quot;&quot;&quot;\n\n# ----------------------------------------------------------------\n# Import any needed standard Python modules.\nimport time, math, sys\n\n# Import the board-specific input\/output library.\nfrom adafruit_circuitplayground import cp\n\n# Import the low-level hardware libraries.\nimport board\nimport digitalio\nimport analogio\nimport pwmio\n\n# Import the Adafruit helper library.\nfrom adafruit_motor import servo\n\n# Import the runtime for checking serial port status.\nimport supervisor\n\n# ----------------------------------------------------------------\n# Initialize hardware.\n\n# Create a PWMOut object on pad SDA A5 to generate control signals.\npwm = pwmio.PWMOut(board.A5, duty_cycle=0, frequency=50)\n\n# Create a Servo object which controls a hobby servo using the PWMOut.\nactuator = servo.Servo(pwm, min_pulse=50, max_pulse=3000)\n\n# ----------------------------------------------------------------\n# Initialize global variables for the main loop.\n\n# The remote move state can be updated via serial port messages.\nremote_moves = [0, 0, 0, 0, 0]\n\n# Measure the time since the last remote move message, and reset after a period without data.\nremote_moves_timer = False\n\n# Convenient time constant expressed in nanoseconds.\nsecond = 1000000000\n\n# Integer time stamp for the next console output.\nsensing_timer = time.monotonic()\n\n# Integer time stamp for next behavior activity to begin.\nnext_activity_time = time.monotonic_ns() + 2 * second\n\n# Flag to trigger motion.\nsweep_slow = False\nsweep_fast = False\n\nphase_angle = 0.0\nphase_rate  = 2*math.pi \/ 6.0  # one cycle per six seconds, in radians\/second\n\n# Integer time stamp for next servo update.\nnext_servo_update = time.monotonic_ns()\n\n# The serial port output rate is regulated using the following timer variables.\nserial_timer    = 0.0\nserial_interval = 0.5\n\n# ----------------------------------------------------------------\n# Begin the main processing loop.\nwhile True:\n\n    # Read the current integer clock.\n    now = time.monotonic()\n\n    # Measure and define local acceleration\n    x, y, z = cp.acceleration\n    l_x = abs(int(x))\n    l_y = abs(int(y))\n    l_z = abs(int(z))\n    local_moves = l_x, l_y, l_z\n\n    # Check the serial input for new line of remote data\n    if supervisor.runtime.serial_bytes_available:\n        line = sys.stdin.readline()\n        tokens = line.split()\n        if len(tokens) == 5:\n            try:\n                remote_moves = [int(token) &amp;gt; 0 for token in tokens]\n                remote_move_timer = 4.0\n            except ValueError:\n                pass\n\n    #---- periodic console output -----------------------------------\n    # Poll the time stamp to decide whether to emit console output.\n    if now &amp;gt;= sensing_timer:\n        sensing_timer += 100000000 #0.1sec\n\n    if any(local_moves):\n        remote_moves_timer = now + 4000000000 # 4 sec timeout\n\n    if now &amp;gt;= serial_timer:\n        serial_timer += serial_interval\n        moves = [&quot;1&quot; if 1 &lt; l_x &lt; 3 else &quot;0&quot;, &quot;1&quot; if l_y &amp;gt; 1 else &quot;0&quot;, &quot;1&quot; if 1 &lt; l_z &lt; 3 else &quot;0&quot;, &quot;1&quot; if l_x &amp;gt; 3 else &quot;0&quot;, &quot;1&quot; if l_z &amp;gt; 3 else &quot;0&quot;]\n        print(&quot; &quot;.join(moves))\n\n    # If a slow movement has been received, sweep twice at a constant speed\n    if sweep_slow is True:\n        for angle in range(0, 180, 10):\n            actuator.angle = angle\n            time.sleep(0.02)\n        print(&quot;Reversing slow sweep.&quot;)\n        for angle in range(180, 0, -10):\n            actuator.angle = angle\n            time.sleep(0.02)\n        print(&quot;End of slow cycle&quot;)\n        sweep_slow = False\n\n    # If a fast movement has been received, sweep twice in a stepping motion\n    if sweep_fast is True:\n        for angle in range(0, 180, 10):\n            actuator.angle = angle\n            time.sleep(0.2)\n        print(&quot;Reversing fast sweep.&quot;)\n        for angle in range(180, 0, -10):\n            actuator.angle = angle\n            time.sleep(0.2)\n        print(&quot;End of fast cycle&quot;)\n        sweep_fast = False\n\n    if any(remote_moves):\n        # Check whether there was any remote movement\n        if remote_moves[0] or remote_moves[2]:\n            if remote_moves[1]:\n                sweep_slow = True\n                print(&quot;Entering slow cycle.&quot;)\n\n        if remote_moves[3] or remote_moves[4]:\n            if remote_moves[1]:\n                sweep_fast = True\n                print(&quot;Entering fast cycle&quot;)\n\n        remote_moves = [False]*5\n\n    #---- periodic servo motion commands ----------------------------\n    # If the time has arrived to update the servo command signal:\n    if now &amp;gt;= next_servo_update:\n        next_servo_update += 20000000  # 20 msec in nanoseconds (50 Hz update)\n<\/pre>\n\n\n<p><\/p>\n","protected":false},"excerpt":{"rendered":"<p>by Celia Kasberg, Helen Yu, and Elle Smith Premise One of the things lost in remote classes and virtual meetings is the subconcious life of the people around&#8230;<\/p>\n","protected":false},"author":77,"featured_media":4968,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":[],"categories":[12],"tags":[],"_links":{"self":[{"href":"https:\/\/courses.ideate.cmu.edu\/16-376\/s2021\/wp-json\/wp\/v2\/posts\/4965"}],"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\/77"}],"replies":[{"embeddable":true,"href":"https:\/\/courses.ideate.cmu.edu\/16-376\/s2021\/wp-json\/wp\/v2\/comments?post=4965"}],"version-history":[{"count":17,"href":"https:\/\/courses.ideate.cmu.edu\/16-376\/s2021\/wp-json\/wp\/v2\/posts\/4965\/revisions"}],"predecessor-version":[{"id":5029,"href":"https:\/\/courses.ideate.cmu.edu\/16-376\/s2021\/wp-json\/wp\/v2\/posts\/4965\/revisions\/5029"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/courses.ideate.cmu.edu\/16-376\/s2021\/wp-json\/wp\/v2\/media\/4968"}],"wp:attachment":[{"href":"https:\/\/courses.ideate.cmu.edu\/16-376\/s2021\/wp-json\/wp\/v2\/media?parent=4965"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/courses.ideate.cmu.edu\/16-376\/s2021\/wp-json\/wp\/v2\/categories?post=4965"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/courses.ideate.cmu.edu\/16-376\/s2021\/wp-json\/wp\/v2\/tags?post=4965"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}