{"id":5783,"date":"2022-12-07T12:11:38","date_gmt":"2022-12-07T17:11:38","guid":{"rendered":"https:\/\/courses.ideate.cmu.edu\/16-223\/f2022\/work\/?p=5783"},"modified":"2022-12-20T11:28:33","modified_gmt":"2022-12-20T16:28:33","slug":"final-report-rebecca-wonho","status":"publish","type":"post","link":"https:\/\/courses.ideate.cmu.edu\/16-223\/f2022\/work\/2022\/12\/07\/final-report-rebecca-wonho\/","title":{"rendered":"Final Report Marble Paint &#8211; Rebecca &amp; Wonho"},"content":{"rendered":"\n<p>Marble Paint is a machine that allows you to paint with marbles using canvas movement. The whole machine consists of a canvas connected to 4 crank motion mechanisms moving in succession.<\/p>\n\n\n\n<h3>Objectives<\/h3>\n\n\n\n<ul><li>Create an interactive painting machine<\/li><li>Allow the children to  have artistic freedom<\/li><li>Make the project easy to interact with<\/li><li>Able to produce variety of paintings (paintings are not structured)<\/li><\/ul>\n\n\n\n<h3>Implemntation and Outcome (from 1st visit)<\/h3>\n\n\n\n<p>The main part of our project consisted of 4 motors moving in crank motion, which would ultimately lift and lower the canvas in certain points. This allowed us to create a table tilt motion as well as have full control of the x and y axis tilt motions. To add additional support in the center, we supported the canvas on a universal joint which was connected to the canvas and the support beam. This prevented the spining of the canvas allowing it to be balanced while moving.<\/p>\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-223\/f2022\/work\/wp-content\/uploads\/2022\/12\/IMG-1995-768x1024.jpg\" alt=\"\" class=\"wp-image-5902\" srcset=\"https:\/\/courses.ideate.cmu.edu\/16-223\/f2022\/work\/wp-content\/uploads\/2022\/12\/IMG-1995-768x1024.jpg 768w, https:\/\/courses.ideate.cmu.edu\/16-223\/f2022\/work\/wp-content\/uploads\/2022\/12\/IMG-1995-225x300.jpg 225w, https:\/\/courses.ideate.cmu.edu\/16-223\/f2022\/work\/wp-content\/uploads\/2022\/12\/IMG-1995-1152x1536.jpg 1152w, https:\/\/courses.ideate.cmu.edu\/16-223\/f2022\/work\/wp-content\/uploads\/2022\/12\/IMG-1995-1536x2048.jpg 1536w, https:\/\/courses.ideate.cmu.edu\/16-223\/f2022\/work\/wp-content\/uploads\/2022\/12\/IMG-1995-973x1297.jpg 973w, https:\/\/courses.ideate.cmu.edu\/16-223\/f2022\/work\/wp-content\/uploads\/2022\/12\/IMG-1995-508x677.jpg 508w, https:\/\/courses.ideate.cmu.edu\/16-223\/f2022\/work\/wp-content\/uploads\/2022\/12\/IMG-1995-scaled.jpg 1920w\" sizes=\"(max-width: 768px) 100vw, 768px\" \/><figcaption>Universal Joint Support<\/figcaption><\/figure>\n\n\n\n<p>The children were able to actively interact with our project. There are some steps that are required to build up towards the moment of discovery for the children. We had to tell them the steps to get our project set up for them. Once they started to play with the marbles, the children found different ways to interact with the paint as well. We observed some children wanting to mix multiple colors of paint to color the canvas where some kids wanted to push the marble with their hands while it was on the canvas. <\/p>\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-223\/f2022\/work\/wp-content\/uploads\/2022\/12\/IMG-2003-2-768x1024.jpg\" alt=\"\" class=\"wp-image-5901\" srcset=\"https:\/\/courses.ideate.cmu.edu\/16-223\/f2022\/work\/wp-content\/uploads\/2022\/12\/IMG-2003-2-768x1024.jpg 768w, https:\/\/courses.ideate.cmu.edu\/16-223\/f2022\/work\/wp-content\/uploads\/2022\/12\/IMG-2003-2-225x300.jpg 225w, https:\/\/courses.ideate.cmu.edu\/16-223\/f2022\/work\/wp-content\/uploads\/2022\/12\/IMG-2003-2-1152x1536.jpg 1152w, https:\/\/courses.ideate.cmu.edu\/16-223\/f2022\/work\/wp-content\/uploads\/2022\/12\/IMG-2003-2-1536x2048.jpg 1536w, https:\/\/courses.ideate.cmu.edu\/16-223\/f2022\/work\/wp-content\/uploads\/2022\/12\/IMG-2003-2-973x1297.jpg 973w, https:\/\/courses.ideate.cmu.edu\/16-223\/f2022\/work\/wp-content\/uploads\/2022\/12\/IMG-2003-2-508x677.jpg 508w, https:\/\/courses.ideate.cmu.edu\/16-223\/f2022\/work\/wp-content\/uploads\/2022\/12\/IMG-2003-2-scaled.jpg 1920w\" sizes=\"(max-width: 768px) 100vw, 768px\" \/><figcaption>Prototype implementation during the first visit<\/figcaption><\/figure>\n\n\n\n<p>The pieces that the children created were really amazing but there was some difference between the preschoolers (3~4 year olds) and the kindergarten group. The older children were able to interact with the marble more in different ways causing the paintings to be more dynamic and have more lines and streaks.<\/p>\n\n\n\n<figure class=\"wp-block-video\"><video controls src=\"https:\/\/courses.ideate.cmu.edu\/16-223\/f2022\/work\/wp-content\/uploads\/2022\/11\/20221107_1339122.mp4\"><\/video><figcaption>Preschoolers (3~4 year olds)<\/figcaption><\/figure>\n\n\n\n<p>Originally, we expected to have marble runs where the children would pour the paint and marbles onto the canvas. However, having the children pour their own paint and directly interact with the marbles allowed us to have more unique pieces. So we decided that we would keep the marble runs only to help the children drop the marbles onto the canvas. The children would ultimately pour the paint themselves and would drop the marbles using their hand or the marble runs.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" width=\"595\" height=\"509\" src=\"https:\/\/courses.ideate.cmu.edu\/16-223\/f2022\/work\/wp-content\/uploads\/2022\/11\/Screen-Shot-2022-11-13-at-11.14.53-PM.png\" alt=\"\" class=\"wp-image-5711\" srcset=\"https:\/\/courses.ideate.cmu.edu\/16-223\/f2022\/work\/wp-content\/uploads\/2022\/11\/Screen-Shot-2022-11-13-at-11.14.53-PM.png 595w, https:\/\/courses.ideate.cmu.edu\/16-223\/f2022\/work\/wp-content\/uploads\/2022\/11\/Screen-Shot-2022-11-13-at-11.14.53-PM-300x257.png 300w, https:\/\/courses.ideate.cmu.edu\/16-223\/f2022\/work\/wp-content\/uploads\/2022\/11\/Screen-Shot-2022-11-13-at-11.14.53-PM-508x435.png 508w\" sizes=\"(max-width: 595px) 100vw, 595px\" \/><figcaption>Kindergarten Group (left) &amp; Preschool Group (right)<\/figcaption><\/figure>\n\n\n\n<h3>Implementation and Outcome (from 2nd visit)<\/h3>\n\n\n\n<p>The 4-year-old children and kindergarteners were excited to see different strokes and color mixing whereas 3-year-old children enjoyed adding a lot of paint and marbles on the canvas. <\/p>\n\n\n\n<p><strong>Major additions to our project<\/strong><\/p>\n\n\n\n<ul><li>Pipets to put paint on canvas<\/li><li>Barrier with 4 exit holes<\/li><li>Water containers below the barrier&#8217;s exit holes<\/li><li>A marble track<\/li><li>Acryllic Shields for electronics<\/li><\/ul>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" width=\"2560\" height=\"2560\" src=\"https:\/\/courses.ideate.cmu.edu\/16-223\/f2022\/work\/wp-content\/uploads\/2022\/12\/20221205_125857-edited-scaled.jpg\" alt=\"\" class=\"wp-image-5801\" srcset=\"https:\/\/courses.ideate.cmu.edu\/16-223\/f2022\/work\/wp-content\/uploads\/2022\/12\/20221205_125857-edited-scaled.jpg 2560w, https:\/\/courses.ideate.cmu.edu\/16-223\/f2022\/work\/wp-content\/uploads\/2022\/12\/20221205_125857-edited-300x300.jpg 300w, https:\/\/courses.ideate.cmu.edu\/16-223\/f2022\/work\/wp-content\/uploads\/2022\/12\/20221205_125857-edited-1024x1024.jpg 1024w, https:\/\/courses.ideate.cmu.edu\/16-223\/f2022\/work\/wp-content\/uploads\/2022\/12\/20221205_125857-edited-150x150.jpg 150w, https:\/\/courses.ideate.cmu.edu\/16-223\/f2022\/work\/wp-content\/uploads\/2022\/12\/20221205_125857-edited-768x768.jpg 768w, https:\/\/courses.ideate.cmu.edu\/16-223\/f2022\/work\/wp-content\/uploads\/2022\/12\/20221205_125857-edited-1536x1536.jpg 1536w, https:\/\/courses.ideate.cmu.edu\/16-223\/f2022\/work\/wp-content\/uploads\/2022\/12\/20221205_125857-edited-2048x2048.jpg 2048w, https:\/\/courses.ideate.cmu.edu\/16-223\/f2022\/work\/wp-content\/uploads\/2022\/12\/20221205_125857-edited-88x88.jpg 88w, https:\/\/courses.ideate.cmu.edu\/16-223\/f2022\/work\/wp-content\/uploads\/2022\/12\/20221205_125857-edited-973x973.jpg 973w, https:\/\/courses.ideate.cmu.edu\/16-223\/f2022\/work\/wp-content\/uploads\/2022\/12\/20221205_125857-edited-508x508.jpg 508w\" sizes=\"(max-width: 2560px) 100vw, 2560px\" \/><figcaption>Setup<\/figcaption><\/figure>\n\n\n\n<p>Pipets: A first, the kindergarteners were not as excited to use pipets to put paint on canvas because they had to wait for us to fill them with paint. When they got tired of waiting, they would grab pipets filled with water and put water on canvas. As a result, one of the groups created a puddle of mixed paint on canvas. Thus, we sped up the process of filling and washing pipets and handing them the marbles. We allowed them to keep adding color of their choice so they don&#8217;t get bored, which worked out. Over time, they started using pipets to put paint on different areas. <\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" width=\"1282\" height=\"1281\" src=\"https:\/\/courses.ideate.cmu.edu\/16-223\/f2022\/work\/wp-content\/uploads\/2022\/12\/20221205_140408-edited.jpg\" alt=\"\" class=\"wp-image-5790\" srcset=\"https:\/\/courses.ideate.cmu.edu\/16-223\/f2022\/work\/wp-content\/uploads\/2022\/12\/20221205_140408-edited.jpg 1282w, https:\/\/courses.ideate.cmu.edu\/16-223\/f2022\/work\/wp-content\/uploads\/2022\/12\/20221205_140408-edited-300x300.jpg 300w, https:\/\/courses.ideate.cmu.edu\/16-223\/f2022\/work\/wp-content\/uploads\/2022\/12\/20221205_140408-edited-1024x1024.jpg 1024w, https:\/\/courses.ideate.cmu.edu\/16-223\/f2022\/work\/wp-content\/uploads\/2022\/12\/20221205_140408-edited-150x150.jpg 150w, https:\/\/courses.ideate.cmu.edu\/16-223\/f2022\/work\/wp-content\/uploads\/2022\/12\/20221205_140408-edited-768x767.jpg 768w, https:\/\/courses.ideate.cmu.edu\/16-223\/f2022\/work\/wp-content\/uploads\/2022\/12\/20221205_140408-edited-88x88.jpg 88w, https:\/\/courses.ideate.cmu.edu\/16-223\/f2022\/work\/wp-content\/uploads\/2022\/12\/20221205_140408-edited-973x972.jpg 973w, https:\/\/courses.ideate.cmu.edu\/16-223\/f2022\/work\/wp-content\/uploads\/2022\/12\/20221205_140408-edited-508x508.jpg 508w\" sizes=\"(max-width: 1282px) 100vw, 1282px\" \/><figcaption>Puddle of Paint by 3-year-olds<\/figcaption><\/figure>\n\n\n\n<figure class=\"wp-block-video\"><video controls src=\"https:\/\/courses.ideate.cmu.edu\/16-223\/f2022\/work\/wp-content\/uploads\/2022\/12\/20221205_135453.mp4\"><\/video><figcaption>3-year-olds (putting water on canvas &amp; grabbing marbles from canvas)<\/figcaption><\/figure>\n\n\n\n<p>Barrier: We added a barrier so that the marbles stay on the canvas for a longer period of time. This worked but the kids&#8217; level of patience would drop over time. They would eventually grab marbles from the canvas. Adding exit holes on the corners would have improved our project because that&#8217;s where marbles get stuck the most.<\/p>\n\n\n\n<p>Water Containers: Most of the kids enjoyed watching the marbles fall into the water containers and grabbing marbles from the them. One of the kids didn&#8217;t like getting their hands wet, so we handed them the washed marbles.<\/p>\n\n\n\n<figure class=\"wp-block-video\"><video controls src=\"https:\/\/courses.ideate.cmu.edu\/16-223\/f2022\/work\/wp-content\/uploads\/2022\/12\/20221205_131607-1.mp4\"><\/video><figcaption>4-year-olds<\/figcaption><\/figure>\n\n\n\n<p>Marble Track: We also introduced them to a track that they can use to create a different stroke of paint. They liked dropping and moving the marbles with their hands more than using this track. This could have been different if we had multiple tracks.<\/p>\n\n\n\n<figure class=\"wp-block-video\"><video controls src=\"https:\/\/courses.ideate.cmu.edu\/16-223\/f2022\/work\/wp-content\/uploads\/2022\/12\/20221205_133419.mp4\"><\/video><figcaption>kindergarteners<\/figcaption><\/figure>\n\n\n\n<figure class=\"wp-container-2 wp-block-gallery-1 wp-block-gallery has-nested-images columns-default is-cropped\">\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" width=\"1024\" height=\"768\" data-id=\"5797\"  src=\"https:\/\/courses.ideate.cmu.edu\/16-223\/f2022\/work\/wp-content\/uploads\/2022\/12\/20221205_133145-1-1024x768.jpg\" alt=\"\" class=\"wp-image-5797\" srcset=\"https:\/\/courses.ideate.cmu.edu\/16-223\/f2022\/work\/wp-content\/uploads\/2022\/12\/20221205_133145-1-1024x768.jpg 1024w, https:\/\/courses.ideate.cmu.edu\/16-223\/f2022\/work\/wp-content\/uploads\/2022\/12\/20221205_133145-1-300x225.jpg 300w, https:\/\/courses.ideate.cmu.edu\/16-223\/f2022\/work\/wp-content\/uploads\/2022\/12\/20221205_133145-1-768x576.jpg 768w, https:\/\/courses.ideate.cmu.edu\/16-223\/f2022\/work\/wp-content\/uploads\/2022\/12\/20221205_133145-1-1536x1152.jpg 1536w, https:\/\/courses.ideate.cmu.edu\/16-223\/f2022\/work\/wp-content\/uploads\/2022\/12\/20221205_133145-1-2048x1536.jpg 2048w, https:\/\/courses.ideate.cmu.edu\/16-223\/f2022\/work\/wp-content\/uploads\/2022\/12\/20221205_133145-1-973x730.jpg 973w, https:\/\/courses.ideate.cmu.edu\/16-223\/f2022\/work\/wp-content\/uploads\/2022\/12\/20221205_133145-1-508x381.jpg 508w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><figcaption><br>after 3 groups<\/figcaption><\/figure>\n<\/figure>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" width=\"766\" height=\"1024\" src=\"https:\/\/courses.ideate.cmu.edu\/16-223\/f2022\/work\/wp-content\/uploads\/2022\/12\/20221205_140408-1-766x1024.jpg\" alt=\"\" class=\"wp-image-5791\" srcset=\"https:\/\/courses.ideate.cmu.edu\/16-223\/f2022\/work\/wp-content\/uploads\/2022\/12\/20221205_140408-1-766x1024.jpg 766w, https:\/\/courses.ideate.cmu.edu\/16-223\/f2022\/work\/wp-content\/uploads\/2022\/12\/20221205_140408-1-224x300.jpg 224w, https:\/\/courses.ideate.cmu.edu\/16-223\/f2022\/work\/wp-content\/uploads\/2022\/12\/20221205_140408-1-768x1027.jpg 768w, https:\/\/courses.ideate.cmu.edu\/16-223\/f2022\/work\/wp-content\/uploads\/2022\/12\/20221205_140408-1-1149x1536.jpg 1149w, https:\/\/courses.ideate.cmu.edu\/16-223\/f2022\/work\/wp-content\/uploads\/2022\/12\/20221205_140408-1-1532x2048.jpg 1532w, https:\/\/courses.ideate.cmu.edu\/16-223\/f2022\/work\/wp-content\/uploads\/2022\/12\/20221205_140408-1-973x1301.jpg 973w, https:\/\/courses.ideate.cmu.edu\/16-223\/f2022\/work\/wp-content\/uploads\/2022\/12\/20221205_140408-1-508x679.jpg 508w, https:\/\/courses.ideate.cmu.edu\/16-223\/f2022\/work\/wp-content\/uploads\/2022\/12\/20221205_140408-1-scaled.jpg 1915w\" sizes=\"(max-width: 766px) 100vw, 766px\" \/><figcaption>Finished Paintings<\/figcaption><\/figure>\n\n\n\n<h3>Future Work<\/h3>\n\n\n\n<ul><li>Variety of motions<\/li><li>Different ways of input: more marble tracks<\/li><li>Smoothen the motion of the canvas<\/li><li>Allow for more exit holes<\/li><li>Larger scale\/canvas<\/li><\/ul>\n\n\n\n<h3>Code and Files from Project<\/h3>\n\n\n<pre class=\"brush: plain; title: ; notranslate\" title=\"\">\n# drv8833.py\n#\n# Raspberry Pi Pico - dual H-bridge motor driver support\n#\n# This module provides a class for controlling a DRV8833 dual H-bridge DC motor driver.\n# This device can drive two low-power DC motor bidirectionally with variable speed.\n#\n# A typical usage requires four digital outputs.  The defaults assumes a Pololu\n# DRV8833 dual motor driver has been wired up to the Pico as follows:\n#   Pico pin 24, GPIO18   -&amp;gt; AIN1\n#   Pico pin 25, GPIO19   -&amp;gt; AIN2\n#   Pico pin 26, GPIO20   -&amp;gt; BIN2\n#   Pico pin 27, GPIO21   -&amp;gt; BIN1\n#   any Pico GND          -&amp;gt; GND\n\n# DRV8833 carrier board: https:\/\/www.pololu.com\/product\/2130\n\n################################################################\n# CircuitPython module documentation:\n# time    https:\/\/circuitpython.readthedocs.io\/en\/latest\/shared-bindings\/time\/index.html\n# math    https:\/\/circuitpython.readthedocs.io\/en\/latest\/shared-bindings\/math\/index.html\n# board   https:\/\/circuitpython.readthedocs.io\/en\/latest\/shared-bindings\/board\/index.html\n# pwmio   https:\/\/circuitpython.readthedocs.io\/en\/latest\/shared-bindings\/pwmio\/index.html\n#\n# Driver lifecycle documentation:\n# https:\/\/circuitpython.readthedocs.io\/en\/latest\/docs\/design_guide.html#lifetime-and-contextmanagers\n#\n################################################################################\n# load standard Python modules\nimport math, time\n\n# load the CircuitPython hardware definition module for pin definitions\nimport board\n\n# load the CircuitPython pulse-width-modulation module for driving hardware\nimport pwmio\n\n#--------------------------------------------------------------------------------\nclass DRV8833:\n    def __init__(self,\n                 AIN1=board.GP18, AIN2=board.GP19,  # control pins for motors 1,2\n                 BIN2=board.GP20, BIN1=board.GP21,  # control pins for motors 3,4\n                 pwm_rate=20000):\n        &quot;&quot;&quot;This class represents a single dual H-bridge driver.  It configures four pins\n        for PWM output and can be used to control two DC motors bidirectionally\n        at variable speed.\n\n        N.B. this does not implement any other timing process, it simply sets\n        motor PWM levels but does not apply feedback, duration, or trajectory.\n        &quot;&quot;&quot;\n        self.ain1 = pwmio.PWMOut(AIN1, duty_cycle=0, frequency=pwm_rate)\n        self.ain2 = pwmio.PWMOut(AIN2, duty_cycle=0, frequency=pwm_rate)\n\n        self.bin1 = pwmio.PWMOut(BIN1, duty_cycle=0, frequency=pwm_rate)\n        self.bin2 = pwmio.PWMOut(BIN2, duty_cycle=0, frequency=pwm_rate)\n\n    def tilt_table(self, channel, rate):\n        &quot;&quot;&quot;Set the speed and direction on a single motor channel.\n\n        :param int channel:  0 for motor A, 1 for motor B\n        :param float rate: modulation value between -1.0 and 1.0, full reverse to full forward.&quot;&quot;&quot;\n\n        # convert the rate into a 16-bit fixed point integer\n        pwm1 = min(max(int(2**16 * abs(rate)), 0), 52000)\n        pwm2 = min(max(int(2**16 * abs(rate)), 0), 52000)\n\n\n        if channel == 0:\n            self.ain1.duty_cycle = 0\n            self.ain2.duty_cycle = pwm1\n            self.bin1.duty_cycle = 0\n            self.bin2.duty_cycle = pwm2\n\n    def roll_x(self, channel, rate):\n        &quot;&quot;&quot;Set the speed and direction on a single motor channel.\n\n        :param int channel:  0 for motor A, 1 for motor B\n        :param float rate: modulation value between -1.0 and 1.0, full reverse to full forward.&quot;&quot;&quot;\n\n        # convert the rate into a 16-bit fixed point integer\n        pwm = min(max(int(2**16 * abs(rate)), 0), 52000)\n\n\n        if channel == 0:\n            self.ain1.duty_cycle = 0\n            self.ain2.duty_cycle = pwm\n            self.bin1.duty_cycle = 0\n            self.bin2.duty_cycle = 0\n\n    def roll_y(self, channel, rate):\n        &quot;&quot;&quot;Set the speed and direction on a single motor channel.\n\n        :param int channel:  0 for motor A, 1 for motor B\n        :param float rate: modulation value between -1.0 and 1.0, full reverse to full forward.&quot;&quot;&quot;\n\n        # convert the rate into a 16-bit fixed point integer\n        pwm = min(max(int(2**16 * abs(rate)), 0), 52000)\n\n\n        if channel == 0:\n            self.ain1.duty_cycle = 0\n            self.ain2.duty_cycle = 0\n            self.bin1.duty_cycle = 0\n            self.bin2.duty_cycle = pwm\n\n\n    def deinit(self):\n        &quot;&quot;&quot;Manage resource release as part of object lifecycle.&quot;&quot;&quot;\n        self.ain1.deinit()\n        self.ain2.deinit()\n        self.bin1.deinit()\n        self.bin2.deinit()\n        self.ain1 = None\n        self.ain2 = None\n        self.bin1 = None\n        self.bin2 = None\n\n    def __enter__(self):\n        return self\n\n    def __exit__(self):\n        # Automatically deinitializes the hardware when exiting a context.\n        self.deinit()\n\n<\/pre>\n\n<pre class=\"brush: plain; title: ; notranslate\" title=\"\">\n# photomotor.py\n#\n# Raspberry Pi Pico - photointerrupter and DC motordemo\n#\n# Demonstrates operating a DC motors driven by a DRV8833 based\n# on a photointerrupter signal.\n#\n# This assumes a photointerrupter circuit is wired to analog input 0.\n#\n# This assumes a Pololu DRV8833 dual motor driver has been wired up to the Pico as follows:\n#   Pico pin 24, GPIO18   -&amp;gt; AIN1\n#   Pico pin 25, GPIO19   -&amp;gt; AIN2\n#   Pico pin 26, GPIO20   -&amp;gt; BIN2\n#   Pico pin 27, GPIO21   -&amp;gt; BIN1\n#   any Pico GND          -&amp;gt; GND\n# DRV8833 carrier board: https:\/\/www.pololu.com\/product\/2130\n\n################################################################\n# CircuitPython module documentation:\n# time    https:\/\/circuitpython.readthedocs.io\/en\/latest\/shared-bindings\/time\/index.html\n# math    https:\/\/circuitpython.readthedocs.io\/en\/latest\/shared-bindings\/math\/index.html\n# board   https:\/\/circuitpython.readthedocs.io\/en\/latest\/shared-bindings\/board\/index.html\n# pwmio   https:\/\/circuitpython.readthedocs.io\/en\/latest\/shared-bindings\/pwmio\/index.html\n\n################################################################################\n# print a banner as reminder of what code is loaded\nprint(&quot;Starting photomotor script.&quot;)\n\n# load standard Python modules\nimport math, time\n\n# load the CircuitPython hardware definition module for pin definitions\nimport board\n\n# load the CircuitPython interface to the analog-to-digital converter\nimport analogio\n\n# load the CircuitPython pulse-width-modulation module for driving hardware\nimport pwmio\n\n# load the drv8833.py module, which should be copied to the top-level of CIRCUITPY\nfrom drv8833 import DRV8833\n\n#--------------------------------------------------------------------------------\n# Create an object to represent a dual motor driver.\nprint(&quot;Creating driver object.&quot;)\ndriver = DRV8833()\n\n# Create an object to represent the ADC0 input, which is physically pin 31.\n# E.g., this may be attached to photocell or photointerrupter with associated pullup resistor.\nsensor = analogio.AnalogIn(board.A0)\n\n\n#--------------------------------------------------------------------------------\n# Begin the main processing loop.  This is structured as a looping script, since\n# each movement primitive 'blocks', i.e. doesn't return until the action is\n# finished.\n\nprint(&quot;Starting main script.&quot;)\nwhile True:\n\n    # Set the motor speed.\n\n    driver.tilt_table(0, 1)\n    time.sleep(4.3)\n    driver.roll_x(0, 1)\n    time.sleep(3.0)\n    driver.tilt_table(0, 1)\n    time.sleep(4.7)\n    driver.roll_y(0, 1)\n    time.sleep(3.0)\n\n<\/pre>\n\n\n<div class=\"wp-block-file\"><a id=\"wp-block-file--media-1f052957-1e1e-47ec-9710-499d25a4127a\" href=\"https:\/\/courses.ideate.cmu.edu\/16-223\/f2022\/work\/wp-content\/uploads\/2022\/12\/marble-paint-CAD-files.zip\">marble paint CAD files<\/a><a href=\"https:\/\/courses.ideate.cmu.edu\/16-223\/f2022\/work\/wp-content\/uploads\/2022\/12\/marble-paint-CAD-files.zip\" class=\"wp-block-file__button\" download aria-describedby=\"wp-block-file--media-1f052957-1e1e-47ec-9710-499d25a4127a\">Download<br><\/a><\/div>\n\n\n\n<h3>Pictures and Videos from Showcase<\/h3>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" width=\"2560\" height=\"2560\" src=\"https:\/\/courses.ideate.cmu.edu\/16-223\/f2022\/work\/wp-content\/uploads\/2022\/12\/IMG_2185-edited-scaled.jpg\" alt=\"\" class=\"wp-image-5808\" srcset=\"https:\/\/courses.ideate.cmu.edu\/16-223\/f2022\/work\/wp-content\/uploads\/2022\/12\/IMG_2185-edited-scaled.jpg 2560w, https:\/\/courses.ideate.cmu.edu\/16-223\/f2022\/work\/wp-content\/uploads\/2022\/12\/IMG_2185-edited-300x300.jpg 300w, https:\/\/courses.ideate.cmu.edu\/16-223\/f2022\/work\/wp-content\/uploads\/2022\/12\/IMG_2185-edited-1024x1024.jpg 1024w, https:\/\/courses.ideate.cmu.edu\/16-223\/f2022\/work\/wp-content\/uploads\/2022\/12\/IMG_2185-edited-150x150.jpg 150w, https:\/\/courses.ideate.cmu.edu\/16-223\/f2022\/work\/wp-content\/uploads\/2022\/12\/IMG_2185-edited-768x768.jpg 768w, https:\/\/courses.ideate.cmu.edu\/16-223\/f2022\/work\/wp-content\/uploads\/2022\/12\/IMG_2185-edited-1536x1536.jpg 1536w, https:\/\/courses.ideate.cmu.edu\/16-223\/f2022\/work\/wp-content\/uploads\/2022\/12\/IMG_2185-edited-2048x2048.jpg 2048w, https:\/\/courses.ideate.cmu.edu\/16-223\/f2022\/work\/wp-content\/uploads\/2022\/12\/IMG_2185-edited-88x88.jpg 88w, https:\/\/courses.ideate.cmu.edu\/16-223\/f2022\/work\/wp-content\/uploads\/2022\/12\/IMG_2185-edited-973x973.jpg 973w, https:\/\/courses.ideate.cmu.edu\/16-223\/f2022\/work\/wp-content\/uploads\/2022\/12\/IMG_2185-edited-508x508.jpg 508w\" sizes=\"(max-width: 2560px) 100vw, 2560px\" \/><figcaption>Project in Action during Showcase<\/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-223\/f2022\/work\/wp-content\/uploads\/2022\/12\/IMG_2189-1-768x1024.jpg\" alt=\"\" class=\"wp-image-5810\" srcset=\"https:\/\/courses.ideate.cmu.edu\/16-223\/f2022\/work\/wp-content\/uploads\/2022\/12\/IMG_2189-1-768x1024.jpg 768w, https:\/\/courses.ideate.cmu.edu\/16-223\/f2022\/work\/wp-content\/uploads\/2022\/12\/IMG_2189-1-225x300.jpg 225w, https:\/\/courses.ideate.cmu.edu\/16-223\/f2022\/work\/wp-content\/uploads\/2022\/12\/IMG_2189-1-1152x1536.jpg 1152w, https:\/\/courses.ideate.cmu.edu\/16-223\/f2022\/work\/wp-content\/uploads\/2022\/12\/IMG_2189-1-1536x2048.jpg 1536w, https:\/\/courses.ideate.cmu.edu\/16-223\/f2022\/work\/wp-content\/uploads\/2022\/12\/IMG_2189-1-973x1297.jpg 973w, https:\/\/courses.ideate.cmu.edu\/16-223\/f2022\/work\/wp-content\/uploads\/2022\/12\/IMG_2189-1-508x677.jpg 508w, https:\/\/courses.ideate.cmu.edu\/16-223\/f2022\/work\/wp-content\/uploads\/2022\/12\/IMG_2189-1-scaled.jpg 1920w\" sizes=\"(max-width: 768px) 100vw, 768px\" \/><figcaption>After the showcase<\/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-223\/f2022\/work\/wp-content\/uploads\/2022\/12\/IMG_2190-768x1024.jpg\" alt=\"\" class=\"wp-image-5811\" srcset=\"https:\/\/courses.ideate.cmu.edu\/16-223\/f2022\/work\/wp-content\/uploads\/2022\/12\/IMG_2190-768x1024.jpg 768w, https:\/\/courses.ideate.cmu.edu\/16-223\/f2022\/work\/wp-content\/uploads\/2022\/12\/IMG_2190-225x300.jpg 225w, https:\/\/courses.ideate.cmu.edu\/16-223\/f2022\/work\/wp-content\/uploads\/2022\/12\/IMG_2190-1152x1536.jpg 1152w, https:\/\/courses.ideate.cmu.edu\/16-223\/f2022\/work\/wp-content\/uploads\/2022\/12\/IMG_2190-1536x2048.jpg 1536w, https:\/\/courses.ideate.cmu.edu\/16-223\/f2022\/work\/wp-content\/uploads\/2022\/12\/IMG_2190-973x1297.jpg 973w, https:\/\/courses.ideate.cmu.edu\/16-223\/f2022\/work\/wp-content\/uploads\/2022\/12\/IMG_2190-508x677.jpg 508w, https:\/\/courses.ideate.cmu.edu\/16-223\/f2022\/work\/wp-content\/uploads\/2022\/12\/IMG_2190-scaled.jpg 1920w\" sizes=\"(max-width: 768px) 100vw, 768px\" \/><figcaption>Pieces from the showcase<\/figcaption><\/figure>\n","protected":false},"excerpt":{"rendered":"<p>Marble Paint is a machine that allows you to paint with marbles using canvas movement. The whole machine consists of a canvas connected to 4 crank motion mechanisms&#8230;<\/p>\n","protected":false},"author":48,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":[],"categories":[1],"tags":[],"_links":{"self":[{"href":"https:\/\/courses.ideate.cmu.edu\/16-223\/f2022\/work\/wp-json\/wp\/v2\/posts\/5783"}],"collection":[{"href":"https:\/\/courses.ideate.cmu.edu\/16-223\/f2022\/work\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/courses.ideate.cmu.edu\/16-223\/f2022\/work\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/courses.ideate.cmu.edu\/16-223\/f2022\/work\/wp-json\/wp\/v2\/users\/48"}],"replies":[{"embeddable":true,"href":"https:\/\/courses.ideate.cmu.edu\/16-223\/f2022\/work\/wp-json\/wp\/v2\/comments?post=5783"}],"version-history":[{"count":20,"href":"https:\/\/courses.ideate.cmu.edu\/16-223\/f2022\/work\/wp-json\/wp\/v2\/posts\/5783\/revisions"}],"predecessor-version":[{"id":5979,"href":"https:\/\/courses.ideate.cmu.edu\/16-223\/f2022\/work\/wp-json\/wp\/v2\/posts\/5783\/revisions\/5979"}],"wp:attachment":[{"href":"https:\/\/courses.ideate.cmu.edu\/16-223\/f2022\/work\/wp-json\/wp\/v2\/media?parent=5783"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/courses.ideate.cmu.edu\/16-223\/f2022\/work\/wp-json\/wp\/v2\/categories?post=5783"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/courses.ideate.cmu.edu\/16-223\/f2022\/work\/wp-json\/wp\/v2\/tags?post=5783"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}