{"id":4824,"date":"2021-03-30T10:06:07","date_gmt":"2021-03-30T14:06:07","guid":{"rendered":"https:\/\/courses.ideate.cmu.edu\/16-376\/s2021\/?p=4824"},"modified":"2021-03-30T10:06:09","modified_gmt":"2021-03-30T14:06:09","slug":"assignment-15-elise-and-kanvi","status":"publish","type":"post","link":"https:\/\/courses.ideate.cmu.edu\/16-376\/s2021\/4824\/assignment-15-elise-and-kanvi\/","title":{"rendered":"Assignment 15 &#8211; Elise and Kanvi"},"content":{"rendered":"\n<p><em><strong>Kanvi&#8217;s prototype<\/strong><\/em><\/p>\n\n\n\n<figure class=\"wp-block-video\"><video controls src=\"https:\/\/courses.ideate.cmu.edu\/16-376\/s2021\/wp-content\/uploads\/2021\/03\/IMG_8945.mp4\"><\/video><figcaption>Video of wire moving petal from &#8220;close&#8221; to open position<\/figcaption><\/figure>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" width=\"1024\" height=\"768\" src=\"https:\/\/courses.ideate.cmu.edu\/16-376\/s2021\/wp-content\/uploads\/2021\/03\/IMG_8947-1024x768.jpg\" alt=\"\" class=\"wp-image-4850\" srcset=\"https:\/\/courses.ideate.cmu.edu\/16-376\/s2021\/wp-content\/uploads\/2021\/03\/IMG_8947-1024x768.jpg 1024w, https:\/\/courses.ideate.cmu.edu\/16-376\/s2021\/wp-content\/uploads\/2021\/03\/IMG_8947-300x225.jpg 300w, https:\/\/courses.ideate.cmu.edu\/16-376\/s2021\/wp-content\/uploads\/2021\/03\/IMG_8947-768x576.jpg 768w, https:\/\/courses.ideate.cmu.edu\/16-376\/s2021\/wp-content\/uploads\/2021\/03\/IMG_8947-1536x1152.jpg 1536w, https:\/\/courses.ideate.cmu.edu\/16-376\/s2021\/wp-content\/uploads\/2021\/03\/IMG_8947-2048x1536.jpg 2048w, https:\/\/courses.ideate.cmu.edu\/16-376\/s2021\/wp-content\/uploads\/2021\/03\/IMG_8947-973x730.jpg 973w, https:\/\/courses.ideate.cmu.edu\/16-376\/s2021\/wp-content\/uploads\/2021\/03\/IMG_8947-508x381.jpg 508w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><figcaption>Wire stand made from paper clips<\/figcaption><\/figure>\n\n\n\n<p>In making this, I learned a few things: the servo sweep must be for a very limited angle range in order to make sure the petal does not fall off and our mechanism for &#8220;closing&#8221; the flower is not visually drastic enough. <\/p>\n\n\n\n<p>For improvements, I might try a different open\/close mechanism and will be working on a full fabric colored flower to animate. I&#8217;ll also be putting together the prototype with the sensor reactive code.<\/p>\n\n\n\n<p>Elise&#8217;s Prototype &#8211; Suspension<\/p>\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=\"IMG 4915\" width=\"620\" height=\"349\" src=\"https:\/\/www.youtube.com\/embed\/4tFUgQGLgj4?feature=oembed\" frameborder=\"0\" allow=\"accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture\" allowfullscreen><\/iframe>\n<\/div><\/figure>\n\n\n\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\/03\/IMG_4916-768x1024.jpg\" alt=\"\" class=\"wp-image-4864\" srcset=\"https:\/\/courses.ideate.cmu.edu\/16-376\/s2021\/wp-content\/uploads\/2021\/03\/IMG_4916-768x1024.jpg 768w, https:\/\/courses.ideate.cmu.edu\/16-376\/s2021\/wp-content\/uploads\/2021\/03\/IMG_4916-225x300.jpg 225w, https:\/\/courses.ideate.cmu.edu\/16-376\/s2021\/wp-content\/uploads\/2021\/03\/IMG_4916-1152x1536.jpg 1152w, https:\/\/courses.ideate.cmu.edu\/16-376\/s2021\/wp-content\/uploads\/2021\/03\/IMG_4916-1536x2048.jpg 1536w, https:\/\/courses.ideate.cmu.edu\/16-376\/s2021\/wp-content\/uploads\/2021\/03\/IMG_4916-973x1297.jpg 973w, https:\/\/courses.ideate.cmu.edu\/16-376\/s2021\/wp-content\/uploads\/2021\/03\/IMG_4916-508x677.jpg 508w, https:\/\/courses.ideate.cmu.edu\/16-376\/s2021\/wp-content\/uploads\/2021\/03\/IMG_4916-scaled.jpg 1920w\" sizes=\"(max-width: 768px) 100vw, 768px\" \/><figcaption>Opened State<\/figcaption><\/figure>\n\n\n\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\/03\/IMG_4917-768x1024.jpg\" alt=\"\" class=\"wp-image-4863\" srcset=\"https:\/\/courses.ideate.cmu.edu\/16-376\/s2021\/wp-content\/uploads\/2021\/03\/IMG_4917-768x1024.jpg 768w, https:\/\/courses.ideate.cmu.edu\/16-376\/s2021\/wp-content\/uploads\/2021\/03\/IMG_4917-225x300.jpg 225w, https:\/\/courses.ideate.cmu.edu\/16-376\/s2021\/wp-content\/uploads\/2021\/03\/IMG_4917-1152x1536.jpg 1152w, https:\/\/courses.ideate.cmu.edu\/16-376\/s2021\/wp-content\/uploads\/2021\/03\/IMG_4917-1536x2048.jpg 1536w, https:\/\/courses.ideate.cmu.edu\/16-376\/s2021\/wp-content\/uploads\/2021\/03\/IMG_4917-973x1297.jpg 973w, https:\/\/courses.ideate.cmu.edu\/16-376\/s2021\/wp-content\/uploads\/2021\/03\/IMG_4917-508x677.jpg 508w, https:\/\/courses.ideate.cmu.edu\/16-376\/s2021\/wp-content\/uploads\/2021\/03\/IMG_4917-scaled.jpg 1920w\" sizes=\"(max-width: 768px) 100vw, 768px\" \/><figcaption>Closed State<\/figcaption><\/figure>\n\n\n\n<p>With Kanvi&#8217;s prototype needing some tweaking, Elise has made a suspended flower petal to try to counteract the use of a stand that might get in the way of the tendon&#8217;s movement. The petal doesn&#8217;t go into the closed state as originally intended, which we could fix with a reversal of the sine movement so that it stops at the closed state. The thick wire used to suspend has a circle at the bottom to attach the other petals. We also had changed to tone to be a little more daunting and jarring but not excessively so. <\/p>\n\n\n\n<p>This prototype does show movement and the gentle back and forth that we intended. The closing is drastic enough to see with just one petal, so if we just fix the code to close, we think a full flower will definitely work. The circuit playground is not in view but for the final product, we can attach it to the inside of the cardboard so that the lights are in view.<\/p>\n\n\n<pre class=\"brush: python; title: ; notranslate\" title=\"\">\nimport time\nimport math\nimport board\nimport pwmio\nfrom adafruit_circuitplayground import cp\nfrom adafruit_motor import servo\n\npwm = pwmio.PWMOut(board.A5, duty_cycle=0, frequency=50)\nactuator = servo.Servo(pwm, min_pulse=1000, max_pulse=2000)\n\nphase_angle = 0.0\nphase_rate  = 2*math.pi \/ 6.0 \nnext_servo_update = time.monotonic_ns()\nnext_status_update = time.monotonic_ns()\n\nwhile True:\n    now = time.monotonic_ns()\n    if cp.sound_level &amp;gt;= 300:\n        actuator.angle = 0\n        cp.pixels.fill((255, 0, 0))\n        cp.play_tone(2000,.5)\n        cp.play_tone(1950, .1)\n        cp.play_tone(1875, .07)\n        cp.play_tone(1900, .3)\n        time.sleep(10)\n\n    elif now &amp;gt;= next_servo_update:\n        cp.pixels.fill((0, 255, 0))\n        next_servo_update += 20000000\n        actuator.angle = 90 + 90 * math.sin(phase_angle)\n        phase_angle += phase_rate * 0.020\n\n    if now &amp;gt;= next_status_update:\n        next_status_update += 500000000 \n<\/pre>","protected":false},"excerpt":{"rendered":"<p>Kanvi&#8217;s prototype In making this, I learned a few things: the servo sweep must be for a very limited angle range in order to make sure the petal&#8230;<\/p>\n","protected":false},"author":84,"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\/4824"}],"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\/84"}],"replies":[{"embeddable":true,"href":"https:\/\/courses.ideate.cmu.edu\/16-376\/s2021\/wp-json\/wp\/v2\/comments?post=4824"}],"version-history":[{"count":11,"href":"https:\/\/courses.ideate.cmu.edu\/16-376\/s2021\/wp-json\/wp\/v2\/posts\/4824\/revisions"}],"predecessor-version":[{"id":4866,"href":"https:\/\/courses.ideate.cmu.edu\/16-376\/s2021\/wp-json\/wp\/v2\/posts\/4824\/revisions\/4866"}],"wp:attachment":[{"href":"https:\/\/courses.ideate.cmu.edu\/16-376\/s2021\/wp-json\/wp\/v2\/media?parent=4824"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/courses.ideate.cmu.edu\/16-376\/s2021\/wp-json\/wp\/v2\/categories?post=4824"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/courses.ideate.cmu.edu\/16-376\/s2021\/wp-json\/wp\/v2\/tags?post=4824"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}