{"id":5323,"date":"2021-05-06T10:31:44","date_gmt":"2021-05-06T14:31:44","guid":{"rendered":"https:\/\/courses.ideate.cmu.edu\/16-376\/s2021\/?p=5323"},"modified":"2021-05-06T10:31:45","modified_gmt":"2021-05-06T14:31:45","slug":"assignment-24-rebecca-k-and-helen","status":"publish","type":"post","link":"https:\/\/courses.ideate.cmu.edu\/16-376\/s2021\/5323\/assignment-24-rebecca-k-and-helen\/","title":{"rendered":"Assignment 24: Rebecca K and Helen"},"content":{"rendered":"\n<h4><strong>Helen&#8217;s Vest<\/strong><\/h4>\n\n\n\n<p><strong>The hand pump inflates<\/strong> the heart shaped organ. Inflating the heart tightens the vest, offering physical security to the user.<\/p>\n\n\n\n<p><strong>The motor pump inflates <\/strong>the collar. The inflated collar offers comfort and protection around the neck. <\/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=\"768\" height=\"1024\" src=\"https:\/\/courses.ideate.cmu.edu\/16-376\/s2021\/wp-content\/uploads\/2021\/05\/IMG_1468-768x1024.jpeg\" alt=\"\" class=\"wp-image-5324\" srcset=\"https:\/\/courses.ideate.cmu.edu\/16-376\/s2021\/wp-content\/uploads\/2021\/05\/IMG_1468-768x1024.jpeg 768w, https:\/\/courses.ideate.cmu.edu\/16-376\/s2021\/wp-content\/uploads\/2021\/05\/IMG_1468-225x300.jpeg 225w, https:\/\/courses.ideate.cmu.edu\/16-376\/s2021\/wp-content\/uploads\/2021\/05\/IMG_1468-1152x1536.jpeg 1152w, https:\/\/courses.ideate.cmu.edu\/16-376\/s2021\/wp-content\/uploads\/2021\/05\/IMG_1468-973x1297.jpeg 973w, https:\/\/courses.ideate.cmu.edu\/16-376\/s2021\/wp-content\/uploads\/2021\/05\/IMG_1468-508x677.jpeg 508w, https:\/\/courses.ideate.cmu.edu\/16-376\/s2021\/wp-content\/uploads\/2021\/05\/IMG_1468.jpeg 1536w\" sizes=\"(max-width: 768px) 100vw, 768px\" \/><figcaption>gravity pulls lace confetti down<\/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=\"769\" height=\"1024\" src=\"https:\/\/courses.ideate.cmu.edu\/16-376\/s2021\/wp-content\/uploads\/2021\/05\/IMG_1470-769x1024.jpeg\" alt=\"\" class=\"wp-image-5325\" srcset=\"https:\/\/courses.ideate.cmu.edu\/16-376\/s2021\/wp-content\/uploads\/2021\/05\/IMG_1470-769x1024.jpeg 769w, https:\/\/courses.ideate.cmu.edu\/16-376\/s2021\/wp-content\/uploads\/2021\/05\/IMG_1470-225x300.jpeg 225w, https:\/\/courses.ideate.cmu.edu\/16-376\/s2021\/wp-content\/uploads\/2021\/05\/IMG_1470-768x1022.jpeg 768w, https:\/\/courses.ideate.cmu.edu\/16-376\/s2021\/wp-content\/uploads\/2021\/05\/IMG_1470-1154x1536.jpeg 1154w, https:\/\/courses.ideate.cmu.edu\/16-376\/s2021\/wp-content\/uploads\/2021\/05\/IMG_1470-973x1295.jpeg 973w, https:\/\/courses.ideate.cmu.edu\/16-376\/s2021\/wp-content\/uploads\/2021\/05\/IMG_1470-508x676.jpeg 508w, https:\/\/courses.ideate.cmu.edu\/16-376\/s2021\/wp-content\/uploads\/2021\/05\/IMG_1470.jpeg 1537w\" sizes=\"(max-width: 769px) 100vw, 769px\" \/><figcaption>vest is &#8220;zippered&#8221; with ties<\/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=\"769\" height=\"1024\" src=\"https:\/\/courses.ideate.cmu.edu\/16-376\/s2021\/wp-content\/uploads\/2021\/05\/IMG_1471-769x1024.jpeg\" alt=\"\" class=\"wp-image-5326\" srcset=\"https:\/\/courses.ideate.cmu.edu\/16-376\/s2021\/wp-content\/uploads\/2021\/05\/IMG_1471-769x1024.jpeg 769w, https:\/\/courses.ideate.cmu.edu\/16-376\/s2021\/wp-content\/uploads\/2021\/05\/IMG_1471-225x300.jpeg 225w, https:\/\/courses.ideate.cmu.edu\/16-376\/s2021\/wp-content\/uploads\/2021\/05\/IMG_1471-768x1022.jpeg 768w, https:\/\/courses.ideate.cmu.edu\/16-376\/s2021\/wp-content\/uploads\/2021\/05\/IMG_1471-1154x1536.jpeg 1154w, https:\/\/courses.ideate.cmu.edu\/16-376\/s2021\/wp-content\/uploads\/2021\/05\/IMG_1471-973x1295.jpeg 973w, https:\/\/courses.ideate.cmu.edu\/16-376\/s2021\/wp-content\/uploads\/2021\/05\/IMG_1471-508x676.jpeg 508w, https:\/\/courses.ideate.cmu.edu\/16-376\/s2021\/wp-content\/uploads\/2021\/05\/IMG_1471.jpeg 1537w\" sizes=\"(max-width: 769px) 100vw, 769px\" \/><figcaption>individual pieces are secured with thread<\/figcaption><\/figure>\n<\/div>\n<\/div>\n\n\n\n<p><strong>Why inflate the collar?<\/strong> The inflation of the collar creates comfort and protection. The comfort comes from the collar&#8217;s similarity to a travel pillow. The protection comes from the fact that the inflated collar shields a vulnerable area. Often when people are anxious, their hand goes to their neck as a subconscious way to protect themselves. <\/p>\n\n\n\n<p><strong>Still to do: <\/strong>add more movement and textiles to the collar to enhance the effect, finishing touches on the body of the vest,  <\/p>\n\n\n\n<p><\/p>\n\n\n\n<p>Rebecca&#8217;s Vest<\/p>\n\n\n\n<p>I am planning to use an inflatable pouch motor to slowly rise the way a garage door does to reveal the safety kit underneath. See a prototype perform that here: <\/p>\n\n\n\n<figure class=\"wp-block-embed is-type-video is-provider-youtube wp-block-embed-youtube wp-embed-aspect-4-3 wp-has-aspect-ratio\"><div class=\"wp-block-embed__wrapper\">\n<iframe loading=\"lazy\" title=\"inflatable pouch motor\" width=\"620\" height=\"465\" src=\"https:\/\/www.youtube.com\/embed\/mqZbLHwTw9Y?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>It travels a considerable vertical distance.<\/p>\n\n\n\n<p>I was alternating between the ideas of inflating one large vacuum and inflating a bunch of smaller pouches. To create each small pouch, I added an extra segment that would hold the bolt connector and be soldered off after inflating the pouch with the motor pump. However, after spending too much time troubleshooting each pouch and looking for holes and accidentally soldering off vinyl, I decided to commit to the idea of creating a one-piece vest.<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" width=\"773\" height=\"1024\" src=\"https:\/\/courses.ideate.cmu.edu\/16-376\/s2021\/wp-content\/uploads\/2021\/05\/Screen-Shot-2021-05-06-at-12.27.22-AM-773x1024.jpg\" alt=\"\" class=\"wp-image-5355\" srcset=\"https:\/\/courses.ideate.cmu.edu\/16-376\/s2021\/wp-content\/uploads\/2021\/05\/Screen-Shot-2021-05-06-at-12.27.22-AM-773x1024.jpg 773w, https:\/\/courses.ideate.cmu.edu\/16-376\/s2021\/wp-content\/uploads\/2021\/05\/Screen-Shot-2021-05-06-at-12.27.22-AM-226x300.jpg 226w, https:\/\/courses.ideate.cmu.edu\/16-376\/s2021\/wp-content\/uploads\/2021\/05\/Screen-Shot-2021-05-06-at-12.27.22-AM-768x1018.jpg 768w, https:\/\/courses.ideate.cmu.edu\/16-376\/s2021\/wp-content\/uploads\/2021\/05\/Screen-Shot-2021-05-06-at-12.27.22-AM-508x673.jpg 508w, https:\/\/courses.ideate.cmu.edu\/16-376\/s2021\/wp-content\/uploads\/2021\/05\/Screen-Shot-2021-05-06-at-12.27.22-AM.jpg 916w\" sizes=\"(max-width: 773px) 100vw, 773px\" \/><figcaption>deflated pouches<\/figcaption><\/figure>\n\n\n\n<p>Following up on the last check-in post, I created &#8220;darts&#8221; in a one piece vest to form folds around the bends of the body. With the dart:<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" width=\"772\" height=\"1024\" src=\"https:\/\/courses.ideate.cmu.edu\/16-376\/s2021\/wp-content\/uploads\/2021\/05\/Screen-Shot-2021-05-06-at-12.27.31-AM-772x1024.jpg\" alt=\"\" class=\"wp-image-5356\" srcset=\"https:\/\/courses.ideate.cmu.edu\/16-376\/s2021\/wp-content\/uploads\/2021\/05\/Screen-Shot-2021-05-06-at-12.27.31-AM-772x1024.jpg 772w, https:\/\/courses.ideate.cmu.edu\/16-376\/s2021\/wp-content\/uploads\/2021\/05\/Screen-Shot-2021-05-06-at-12.27.31-AM-226x300.jpg 226w, https:\/\/courses.ideate.cmu.edu\/16-376\/s2021\/wp-content\/uploads\/2021\/05\/Screen-Shot-2021-05-06-at-12.27.31-AM-768x1019.jpg 768w, https:\/\/courses.ideate.cmu.edu\/16-376\/s2021\/wp-content\/uploads\/2021\/05\/Screen-Shot-2021-05-06-at-12.27.31-AM-508x674.jpg 508w, https:\/\/courses.ideate.cmu.edu\/16-376\/s2021\/wp-content\/uploads\/2021\/05\/Screen-Shot-2021-05-06-at-12.27.31-AM.jpg 894w\" sizes=\"(max-width: 772px) 100vw, 772px\" \/><\/figure>\n\n\n\n<p>Without the dart:<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" width=\"785\" height=\"1024\" src=\"https:\/\/courses.ideate.cmu.edu\/16-376\/s2021\/wp-content\/uploads\/2021\/05\/Screen-Shot-2021-05-06-at-12.27.40-AM-785x1024.jpg\" alt=\"\" class=\"wp-image-5357\" srcset=\"https:\/\/courses.ideate.cmu.edu\/16-376\/s2021\/wp-content\/uploads\/2021\/05\/Screen-Shot-2021-05-06-at-12.27.40-AM-785x1024.jpg 785w, https:\/\/courses.ideate.cmu.edu\/16-376\/s2021\/wp-content\/uploads\/2021\/05\/Screen-Shot-2021-05-06-at-12.27.40-AM-230x300.jpg 230w, https:\/\/courses.ideate.cmu.edu\/16-376\/s2021\/wp-content\/uploads\/2021\/05\/Screen-Shot-2021-05-06-at-12.27.40-AM-768x1001.jpg 768w, https:\/\/courses.ideate.cmu.edu\/16-376\/s2021\/wp-content\/uploads\/2021\/05\/Screen-Shot-2021-05-06-at-12.27.40-AM-508x662.jpg 508w, https:\/\/courses.ideate.cmu.edu\/16-376\/s2021\/wp-content\/uploads\/2021\/05\/Screen-Shot-2021-05-06-at-12.27.40-AM.jpg 954w\" sizes=\"(max-width: 785px) 100vw, 785px\" \/><\/figure>\n\n\n\n<p>Because there is only one motor pump which is going to inflate the pouch motor shown in the video, I considered using the heart pump to inflate the one-vacuum vest. I quickly discarded that idea.<\/p>\n\n\n\n<figure class=\"wp-block-embed is-type-video is-provider-youtube wp-block-embed-youtube wp-embed-aspect-4-3 wp-has-aspect-ratio\"><div class=\"wp-block-embed__wrapper\">\n<iframe loading=\"lazy\" title=\"heart pump........\" width=\"620\" height=\"465\" src=\"https:\/\/www.youtube.com\/embed\/RASpBNbk6EE?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>So, I have to create three separate compartments: one pouch motor, one segment to inflate with the heart pump so I can send Helen my signal, and the body of the vest (which will hold my safety kit).<\/p>\n\n\n\n<p><strong>Code<\/strong><\/p>\n\n\n<pre class=\"brush: python; title: ; notranslate\" title=\"\">\n&quot;&quot;&quot;\nProject 2: Active Proxy Body\n\nHelen Yu (heleny1), Rebecca Kim\n\nWritten by Helen Yu\nLast Updated: 5\/4\/21\n\nSummary: When you clench your pump and inflate your vest, your\npartner's vest leaps into defense mode. A hobby servo helps control\nthe defense mechanism, be it spikes, projectiles, webs, etc.\n\nInputs: Soft Touch Sensor on A1\nOutputs: Motor Pump on A2\n&quot;&quot;&quot;\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# Configure the digital input pin used for its pullup resistor bias voltage.\nbias = digitalio.DigitalInOut(board.D10)        # pad A3\nbias.switch_to_input(pull=digitalio.Pull.UP)\n\n# Configure the analog input pin used to measure the sensor voltage.\nsensor = analogio.AnalogIn(board.A1)\nscaling = sensor.reference_voltage \/ (2**16)\n\n# Create a PWMOut object (motor pump) on pad A2 to generate control signals.\npwm = pwmio.PWMOut(board.A2, duty_cycle=0, frequency=2000)\n\n# ----------------------------------------------------------------\n# Initialize global variables for the main loop.\n\nremote_touch = [0]\n\n# Measure the time since the last remote move message, and reset after a period without data.\nremote_touch_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.\ninflate_state = False\n\nphase_angle = 0.0\ncycle_duration = 12                       # seconds per cycle\nphase_rate  = 2*math.pi \/ cycle_duration  # radians\/second\n\n# Integer time stamp for next servo update.\nnext_pump_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     #---- soft sensor input and display -----------------------------\n    # Read the integer sensor value and scale it to a value in Volts.\n    volts = sensor.value * scaling\n\n    # Normalize the soft sensor reading.  Typically you'll need to adjust these values to your device.\n    low_pressure_voltage  = 0.65\n    high_pressure_voltage = 0.20\n    pressure = abs((high_pressure_voltage - volts) \/ (high_pressure_voltage - low_pressure_voltage))\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) == 1:\n            try:\n                remote_touch = [int(token) &amp;gt; 0 for token in tokens]\n                remote_touch_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 pressure &amp;gt; 0.5:\n        remote_touch_timer = now + 4000000000 # 4 sec timeout\n\n    if now &amp;gt;= serial_timer:\n        serial_timer += serial_interval\n        touch = [&quot;1&quot; if pressure &amp;gt; 0.5 else &quot;0&quot;]\n        print(pressure)\n        print(&quot; &quot;.join(touch))\n\n    # If a slow movement has been received, sweep twice at a constant speed\n    if inflate_state is True:\n        pwm.duty_cycle = 2**16-1\n        print(&quot;Defense activated.&quot;)\n        time.sleep(10)\n        pwm.duty_cycle = 0\n        print(&quot;Defense deactivated&quot;)\n        inflate_state = False\n\n    if any(remote_touch):\n        # Check whether there was any remote movement\n        if remote_touch[0]:\n            inflate_state = True\n            print(&quot;Engage defense&quot;)\n        remote_touch = [False]\n\n    #---- periodic servo motion commands ----------------------------\n    # If the time has arrived to update the servo command signal:\n    if now &amp;gt;= next_pump_update:\n        next_pump_update += 20000000  # 20 msec in nanoseconds (50 Hz update)\n\n<\/pre>","protected":false},"excerpt":{"rendered":"<p>Helen&#8217;s Vest The hand pump inflates the heart shaped organ. Inflating the heart tightens the vest, offering physical security to the user. The motor pump inflates the collar&#8230;.<\/p>\n","protected":false},"author":77,"featured_media":0,"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\/5323"}],"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=5323"}],"version-history":[{"count":5,"href":"https:\/\/courses.ideate.cmu.edu\/16-376\/s2021\/wp-json\/wp\/v2\/posts\/5323\/revisions"}],"predecessor-version":[{"id":5361,"href":"https:\/\/courses.ideate.cmu.edu\/16-376\/s2021\/wp-json\/wp\/v2\/posts\/5323\/revisions\/5361"}],"wp:attachment":[{"href":"https:\/\/courses.ideate.cmu.edu\/16-376\/s2021\/wp-json\/wp\/v2\/media?parent=5323"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/courses.ideate.cmu.edu\/16-376\/s2021\/wp-json\/wp\/v2\/categories?post=5323"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/courses.ideate.cmu.edu\/16-376\/s2021\/wp-json\/wp\/v2\/tags?post=5323"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}