{"id":11295,"date":"2021-10-08T15:32:08","date_gmt":"2021-10-08T19:32:08","guid":{"rendered":"https:\/\/courses.ideate.cmu.edu\/62-362\/f2021\/?p=11295"},"modified":"2021-10-08T15:49:40","modified_gmt":"2021-10-08T19:49:40","slug":"robovend-andy-kong","status":"publish","type":"post","link":"https:\/\/courses.ideate.cmu.edu\/62-362\/f2021\/robovend-andy-kong\/","title":{"rendered":"RoboVend"},"content":{"rendered":"<h4><img loading=\"lazy\" class=\"alignnone wp-image-11344 size-full\" src=\"https:\/\/courses.ideate.cmu.edu\/62-362\/f2021\/wp-content\/uploads\/2021\/10\/hero-scaled.jpg\" alt=\"\" width=\"2560\" height=\"1711\" srcset=\"https:\/\/courses.ideate.cmu.edu\/62-362\/f2021\/wp-content\/uploads\/2021\/10\/hero-scaled.jpg 2560w, https:\/\/courses.ideate.cmu.edu\/62-362\/f2021\/wp-content\/uploads\/2021\/10\/hero-300x201.jpg 300w, https:\/\/courses.ideate.cmu.edu\/62-362\/f2021\/wp-content\/uploads\/2021\/10\/hero-1024x684.jpg 1024w, https:\/\/courses.ideate.cmu.edu\/62-362\/f2021\/wp-content\/uploads\/2021\/10\/hero-768x513.jpg 768w, https:\/\/courses.ideate.cmu.edu\/62-362\/f2021\/wp-content\/uploads\/2021\/10\/hero-1536x1027.jpg 1536w, https:\/\/courses.ideate.cmu.edu\/62-362\/f2021\/wp-content\/uploads\/2021\/10\/hero-2048x1369.jpg 2048w, https:\/\/courses.ideate.cmu.edu\/62-362\/f2021\/wp-content\/uploads\/2021\/10\/hero-973x650.jpg 973w, https:\/\/courses.ideate.cmu.edu\/62-362\/f2021\/wp-content\/uploads\/2021\/10\/hero-508x340.jpg 508w\" sizes=\"(max-width: 2560px) 100vw, 2560px\" \/><\/h4>\n<h3>Child Description<\/h3>\n<p>This is a skinny black box about a foot tall, with the same shape as a desktop computer. It has a toothy gap down the left side, and is cut out of a glossy, hard material. The top face has a series of copper pads in the shape of a palm and 5 fingers, with green LEDs above each finger. There&#8217;s also a gap in the top-center of the top face, through which a snack on wax paper peeks through.<\/p>\n<p>The hand shape of the top invites you to position your hand over it,\u00a0 and the LEDs light up as each &#8220;finger&#8221; is touched. Multiple lights can be on at the same time. When a specific set of pads are touched simultaneously, fulfilling a code, the LEDs glow sequentially and a small beep sound is emitted from the interior. Then, a motor whirrs and fruit-by-the-foot is dispensed from the top gap.<\/p>\n<h3>Reflection<\/h3>\n<p>My project had too much thinking in it. Mainly, I remember spending a lot of time agonizing about what a dominant robot would look like so I could design the vending machine around it, as if I were making a specification for it. As an exploratory design, I should have spent less time nailing down what the actual design would be and instead spent more time iterating over a few designs, and seeing what made sense in the context of a machine user. In the future I&#8217;d like to make things that require less thinking, which are more hands-on\u00a0 enjoyable projects. I don&#8217;t know how they tricked me, a hands-on pesron, into thinking so much without doing.<\/p>\n<p>As a rather absent-minded person, I forget a lot of relevant things I&#8217;ve learned over the years. One is that physical construction is hard and takes time, even if you know exactly what you&#8217;re doing. Mistakes take half an hour to correct, which isn&#8217;t the case for electronics or programming. I expected the electronics to go quickly, and I finished those in about 2 hours. But when it came to the wheel that actually dispensed the fruit-by-the-foot, the mount for the motor and fruit roll took me way longer to think of and build. By the time I finished adjusting the gap between the motor and the fruit roll, the plastic gears in the gearbox had clean stripped off, and the wheel no longer worked under any load. Unfortunately, I had hot-glued everything into place because I expected it to work, which turned out to be a terrible decision since I couldn&#8217;t get in and replace the gearbox. I forget this stuff when I haven&#8217;t been building in a while, but I have been reminded. I also re-learned how to use the laser cutters, which is great! Can&#8217;t wait to make more enclosures!<\/p>\n<p>I spoke with Erin a bit towards the beginning of the project about how I felt like anything I could make was futile. It would all end up in the landfill, from nice clean parts that anyone could use, to hole-ridden sheets of acrylic that would be left for the moss to decay in 4 billion years. Erin said futility and uselessness were fine byproducts of the system we&#8217;d build since many of the parts would be recycled, which I had and have trouble agreeing with. In the future I will try to build more practical things, since many such projects I think of can fit y&#8217;all&#8217;s descriptions, be artistic, and be useful. Obviously that is hard, but we are practicing so I should feel less bad if I fail. And I won&#8217;t have to force myself to work on them, which is a major incentive.<\/p>\n<h3>In-Process Photos<\/h3>\n<h4><\/h4>\n<div id=\"attachment_11345\" style=\"width: 235px\" class=\"wp-caption alignnone\"><img aria-describedby=\"caption-attachment-11345\" loading=\"lazy\" class=\"wp-image-11345 size-medium\" src=\"https:\/\/courses.ideate.cmu.edu\/62-362\/f2021\/wp-content\/uploads\/2021\/10\/process_cardboardreel-225x300.jpg\" alt=\"Box prototype for holding reels and dispensing their contents\" width=\"225\" height=\"300\" srcset=\"https:\/\/courses.ideate.cmu.edu\/62-362\/f2021\/wp-content\/uploads\/2021\/10\/process_cardboardreel-225x300.jpg 225w, https:\/\/courses.ideate.cmu.edu\/62-362\/f2021\/wp-content\/uploads\/2021\/10\/process_cardboardreel-768x1024.jpg 768w, https:\/\/courses.ideate.cmu.edu\/62-362\/f2021\/wp-content\/uploads\/2021\/10\/process_cardboardreel-1152x1536.jpg 1152w, https:\/\/courses.ideate.cmu.edu\/62-362\/f2021\/wp-content\/uploads\/2021\/10\/process_cardboardreel-1536x2048.jpg 1536w, https:\/\/courses.ideate.cmu.edu\/62-362\/f2021\/wp-content\/uploads\/2021\/10\/process_cardboardreel-973x1297.jpg 973w, https:\/\/courses.ideate.cmu.edu\/62-362\/f2021\/wp-content\/uploads\/2021\/10\/process_cardboardreel-508x677.jpg 508w, https:\/\/courses.ideate.cmu.edu\/62-362\/f2021\/wp-content\/uploads\/2021\/10\/process_cardboardreel-scaled.jpg 1920w\" sizes=\"(max-width: 225px) 100vw, 225px\" \/><p id=\"caption-attachment-11345\" class=\"wp-caption-text\">Box prototype for holding reels and dispensing their contents. Maquette in the back<\/p><\/div>\n<div id=\"attachment_11346\" style=\"width: 310px\" class=\"wp-caption alignnone\"><img aria-describedby=\"caption-attachment-11346\" loading=\"lazy\" class=\"wp-image-11346 size-medium\" src=\"https:\/\/courses.ideate.cmu.edu\/62-362\/f2021\/wp-content\/uploads\/2021\/10\/process_dots1-300x225.jpg\" alt=\"First design of dots dispenser. I tested on string, but that didn't work really well so I switched it to candy\" width=\"300\" height=\"225\" srcset=\"https:\/\/courses.ideate.cmu.edu\/62-362\/f2021\/wp-content\/uploads\/2021\/10\/process_dots1-300x225.jpg 300w, https:\/\/courses.ideate.cmu.edu\/62-362\/f2021\/wp-content\/uploads\/2021\/10\/process_dots1-1024x768.jpg 1024w, https:\/\/courses.ideate.cmu.edu\/62-362\/f2021\/wp-content\/uploads\/2021\/10\/process_dots1-768x576.jpg 768w, https:\/\/courses.ideate.cmu.edu\/62-362\/f2021\/wp-content\/uploads\/2021\/10\/process_dots1-1536x1152.jpg 1536w, https:\/\/courses.ideate.cmu.edu\/62-362\/f2021\/wp-content\/uploads\/2021\/10\/process_dots1-2048x1536.jpg 2048w, https:\/\/courses.ideate.cmu.edu\/62-362\/f2021\/wp-content\/uploads\/2021\/10\/process_dots1-973x730.jpg 973w, https:\/\/courses.ideate.cmu.edu\/62-362\/f2021\/wp-content\/uploads\/2021\/10\/process_dots1-508x381.jpg 508w\" sizes=\"(max-width: 300px) 100vw, 300px\" \/><p id=\"caption-attachment-11346\" class=\"wp-caption-text\">First design of dots dispenser. I tested on string, but that didn&#8217;t work really well so I switched it to candy<\/p><\/div>\n<div id=\"attachment_11347\" style=\"width: 235px\" class=\"wp-caption alignnone\"><img aria-describedby=\"caption-attachment-11347\" loading=\"lazy\" class=\"wp-image-11347 size-medium\" src=\"https:\/\/courses.ideate.cmu.edu\/62-362\/f2021\/wp-content\/uploads\/2021\/10\/process_dots2-225x300.jpg\" alt=\"Mounted dots dispenser, loaded up with candy\" width=\"225\" height=\"300\" srcset=\"https:\/\/courses.ideate.cmu.edu\/62-362\/f2021\/wp-content\/uploads\/2021\/10\/process_dots2-225x300.jpg 225w, https:\/\/courses.ideate.cmu.edu\/62-362\/f2021\/wp-content\/uploads\/2021\/10\/process_dots2-768x1024.jpg 768w, https:\/\/courses.ideate.cmu.edu\/62-362\/f2021\/wp-content\/uploads\/2021\/10\/process_dots2-1152x1536.jpg 1152w, https:\/\/courses.ideate.cmu.edu\/62-362\/f2021\/wp-content\/uploads\/2021\/10\/process_dots2-1536x2048.jpg 1536w, https:\/\/courses.ideate.cmu.edu\/62-362\/f2021\/wp-content\/uploads\/2021\/10\/process_dots2-973x1297.jpg 973w, https:\/\/courses.ideate.cmu.edu\/62-362\/f2021\/wp-content\/uploads\/2021\/10\/process_dots2-508x677.jpg 508w, https:\/\/courses.ideate.cmu.edu\/62-362\/f2021\/wp-content\/uploads\/2021\/10\/process_dots2-scaled.jpg 1920w\" sizes=\"(max-width: 225px) 100vw, 225px\" \/><p id=\"caption-attachment-11347\" class=\"wp-caption-text\">Mounted dots dispenser, loaded up with candy<\/p><\/div>\n<div id=\"attachment_11348\" style=\"width: 310px\" class=\"wp-caption alignnone\"><img aria-describedby=\"caption-attachment-11348\" loading=\"lazy\" class=\"wp-image-11348 size-medium\" src=\"https:\/\/courses.ideate.cmu.edu\/62-362\/f2021\/wp-content\/uploads\/2021\/10\/process_reel-scaled-e1633720866598-300x300.jpg\" alt=\"Showing 2nd iteration of the dots dispenser\" width=\"300\" height=\"300\" srcset=\"https:\/\/courses.ideate.cmu.edu\/62-362\/f2021\/wp-content\/uploads\/2021\/10\/process_reel-scaled-e1633720866598-300x300.jpg 300w, https:\/\/courses.ideate.cmu.edu\/62-362\/f2021\/wp-content\/uploads\/2021\/10\/process_reel-scaled-e1633720866598-1024x1024.jpg 1024w, https:\/\/courses.ideate.cmu.edu\/62-362\/f2021\/wp-content\/uploads\/2021\/10\/process_reel-scaled-e1633720866598-150x150.jpg 150w, https:\/\/courses.ideate.cmu.edu\/62-362\/f2021\/wp-content\/uploads\/2021\/10\/process_reel-scaled-e1633720866598-768x768.jpg 768w, https:\/\/courses.ideate.cmu.edu\/62-362\/f2021\/wp-content\/uploads\/2021\/10\/process_reel-scaled-e1633720866598-1536x1536.jpg 1536w, https:\/\/courses.ideate.cmu.edu\/62-362\/f2021\/wp-content\/uploads\/2021\/10\/process_reel-scaled-e1633720866598-88x88.jpg 88w, https:\/\/courses.ideate.cmu.edu\/62-362\/f2021\/wp-content\/uploads\/2021\/10\/process_reel-scaled-e1633720866598-973x973.jpg 973w, https:\/\/courses.ideate.cmu.edu\/62-362\/f2021\/wp-content\/uploads\/2021\/10\/process_reel-scaled-e1633720866598-508x508.jpg 508w, https:\/\/courses.ideate.cmu.edu\/62-362\/f2021\/wp-content\/uploads\/2021\/10\/process_reel-scaled-e1633720866598.jpg 1920w\" sizes=\"(max-width: 300px) 100vw, 300px\" \/><p id=\"caption-attachment-11348\" class=\"wp-caption-text\">2nd iteration of the dots dispenser. The dots go between the roller and the cardboard<\/p><\/div>\n<div id=\"attachment_11349\" style=\"width: 264px\" class=\"wp-caption alignnone\"><img aria-describedby=\"caption-attachment-11349\" loading=\"lazy\" class=\"wp-image-11349 size-medium\" src=\"https:\/\/courses.ideate.cmu.edu\/62-362\/f2021\/wp-content\/uploads\/2021\/10\/process_roller-e1633721133993-254x300.png\" alt=\"Adding a nub to the wheel allowed better grip to things on the track, so much so that I could pull the flat wrapping of the candy. This also informed my decision to add a track in the final version.\" width=\"254\" height=\"300\" srcset=\"https:\/\/courses.ideate.cmu.edu\/62-362\/f2021\/wp-content\/uploads\/2021\/10\/process_roller-e1633721133993-254x300.png 254w, https:\/\/courses.ideate.cmu.edu\/62-362\/f2021\/wp-content\/uploads\/2021\/10\/process_roller-e1633721133993-867x1024.png 867w, https:\/\/courses.ideate.cmu.edu\/62-362\/f2021\/wp-content\/uploads\/2021\/10\/process_roller-e1633721133993-768x907.png 768w, https:\/\/courses.ideate.cmu.edu\/62-362\/f2021\/wp-content\/uploads\/2021\/10\/process_roller-e1633721133993-973x1150.png 973w, https:\/\/courses.ideate.cmu.edu\/62-362\/f2021\/wp-content\/uploads\/2021\/10\/process_roller-e1633721133993-508x600.png 508w, https:\/\/courses.ideate.cmu.edu\/62-362\/f2021\/wp-content\/uploads\/2021\/10\/process_roller-e1633721133993.png 1080w\" sizes=\"(max-width: 254px) 100vw, 254px\" \/><p id=\"caption-attachment-11349\" class=\"wp-caption-text\">Adding a nub to the wheel allowed better grip to things on the track, so much so that I could pull the flat wrapping of the candy. This also informed my decision to add a track in the final version.<\/p><\/div>\n<h3>Finished Photos<\/h3>\n<div id=\"attachment_11343\" style=\"width: 310px\" class=\"wp-caption alignnone\"><img aria-describedby=\"caption-attachment-11343\" loading=\"lazy\" class=\"wp-image-11343 size-medium\" src=\"https:\/\/courses.ideate.cmu.edu\/62-362\/f2021\/wp-content\/uploads\/2021\/10\/fin_mythos-300x225.jpg\" alt=\"Part of the mythos of the Robovend is its robotic creator, who wanted a vending machine that both humans and factory floor robots could benefit from\" width=\"300\" height=\"225\" srcset=\"https:\/\/courses.ideate.cmu.edu\/62-362\/f2021\/wp-content\/uploads\/2021\/10\/fin_mythos-300x225.jpg 300w, https:\/\/courses.ideate.cmu.edu\/62-362\/f2021\/wp-content\/uploads\/2021\/10\/fin_mythos-1024x768.jpg 1024w, https:\/\/courses.ideate.cmu.edu\/62-362\/f2021\/wp-content\/uploads\/2021\/10\/fin_mythos-768x576.jpg 768w, https:\/\/courses.ideate.cmu.edu\/62-362\/f2021\/wp-content\/uploads\/2021\/10\/fin_mythos-1536x1152.jpg 1536w, https:\/\/courses.ideate.cmu.edu\/62-362\/f2021\/wp-content\/uploads\/2021\/10\/fin_mythos-2048x1536.jpg 2048w, https:\/\/courses.ideate.cmu.edu\/62-362\/f2021\/wp-content\/uploads\/2021\/10\/fin_mythos-973x730.jpg 973w, https:\/\/courses.ideate.cmu.edu\/62-362\/f2021\/wp-content\/uploads\/2021\/10\/fin_mythos-508x381.jpg 508w\" sizes=\"(max-width: 300px) 100vw, 300px\" \/><p id=\"caption-attachment-11343\" class=\"wp-caption-text\">Part of the mythos of the Robovend is its robotic creator, who wanted a vending machine that both humans and factory floor robots could benefit from<\/p><\/div>\n<div id=\"attachment_11338\" style=\"width: 235px\" class=\"wp-caption alignnone\"><img aria-describedby=\"caption-attachment-11338\" loading=\"lazy\" class=\"wp-image-11338 size-medium\" src=\"https:\/\/courses.ideate.cmu.edu\/62-362\/f2021\/wp-content\/uploads\/2021\/10\/fin_completedbackpanel-225x300.jpg\" alt=\"Wiring of the LEDs and touch responsive pads. The pads were connected to the Arduino through a small hole in the top acrylic panel\" width=\"225\" height=\"300\" srcset=\"https:\/\/courses.ideate.cmu.edu\/62-362\/f2021\/wp-content\/uploads\/2021\/10\/fin_completedbackpanel-225x300.jpg 225w, https:\/\/courses.ideate.cmu.edu\/62-362\/f2021\/wp-content\/uploads\/2021\/10\/fin_completedbackpanel-768x1024.jpg 768w, https:\/\/courses.ideate.cmu.edu\/62-362\/f2021\/wp-content\/uploads\/2021\/10\/fin_completedbackpanel-1152x1536.jpg 1152w, https:\/\/courses.ideate.cmu.edu\/62-362\/f2021\/wp-content\/uploads\/2021\/10\/fin_completedbackpanel-1536x2048.jpg 1536w, https:\/\/courses.ideate.cmu.edu\/62-362\/f2021\/wp-content\/uploads\/2021\/10\/fin_completedbackpanel-973x1297.jpg 973w, https:\/\/courses.ideate.cmu.edu\/62-362\/f2021\/wp-content\/uploads\/2021\/10\/fin_completedbackpanel-508x677.jpg 508w, https:\/\/courses.ideate.cmu.edu\/62-362\/f2021\/wp-content\/uploads\/2021\/10\/fin_completedbackpanel-scaled.jpg 1920w\" sizes=\"(max-width: 225px) 100vw, 225px\" \/><p id=\"caption-attachment-11338\" class=\"wp-caption-text\">Wiring of the LEDs and touch responsive pads. The pads were connected to the Arduino through a small hole in the top acrylic panel<\/p><\/div>\n<div id=\"attachment_11339\" style=\"width: 235px\" class=\"wp-caption alignnone\"><img aria-describedby=\"caption-attachment-11339\" loading=\"lazy\" class=\"wp-image-11339 size-medium\" src=\"https:\/\/courses.ideate.cmu.edu\/62-362\/f2021\/wp-content\/uploads\/2021\/10\/fin_finaldispenser-225x300.jpg\" alt=\"The fruit by the foot dispensing mechanism. This final mechanism worked until the gearbox broke itself\" width=\"225\" height=\"300\" srcset=\"https:\/\/courses.ideate.cmu.edu\/62-362\/f2021\/wp-content\/uploads\/2021\/10\/fin_finaldispenser-225x300.jpg 225w, https:\/\/courses.ideate.cmu.edu\/62-362\/f2021\/wp-content\/uploads\/2021\/10\/fin_finaldispenser-768x1024.jpg 768w, https:\/\/courses.ideate.cmu.edu\/62-362\/f2021\/wp-content\/uploads\/2021\/10\/fin_finaldispenser-1152x1536.jpg 1152w, https:\/\/courses.ideate.cmu.edu\/62-362\/f2021\/wp-content\/uploads\/2021\/10\/fin_finaldispenser-1536x2048.jpg 1536w, https:\/\/courses.ideate.cmu.edu\/62-362\/f2021\/wp-content\/uploads\/2021\/10\/fin_finaldispenser-973x1297.jpg 973w, https:\/\/courses.ideate.cmu.edu\/62-362\/f2021\/wp-content\/uploads\/2021\/10\/fin_finaldispenser-508x677.jpg 508w, https:\/\/courses.ideate.cmu.edu\/62-362\/f2021\/wp-content\/uploads\/2021\/10\/fin_finaldispenser-scaled.jpg 1920w\" sizes=\"(max-width: 225px) 100vw, 225px\" \/><p id=\"caption-attachment-11339\" class=\"wp-caption-text\">The fruit by the foot dispensing mechanism. This final mechanism worked until the gearbox broke itself<\/p><\/div>\n<div id=\"attachment_11340\" style=\"width: 235px\" class=\"wp-caption alignnone\"><img aria-describedby=\"caption-attachment-11340\" loading=\"lazy\" class=\"wp-image-11340 size-medium\" src=\"https:\/\/courses.ideate.cmu.edu\/62-362\/f2021\/wp-content\/uploads\/2021\/10\/fin_handtop-225x300.jpg\" alt=\"Robovend's pads are all touch responsive\" width=\"225\" height=\"300\" srcset=\"https:\/\/courses.ideate.cmu.edu\/62-362\/f2021\/wp-content\/uploads\/2021\/10\/fin_handtop-225x300.jpg 225w, https:\/\/courses.ideate.cmu.edu\/62-362\/f2021\/wp-content\/uploads\/2021\/10\/fin_handtop-768x1024.jpg 768w, https:\/\/courses.ideate.cmu.edu\/62-362\/f2021\/wp-content\/uploads\/2021\/10\/fin_handtop-1152x1536.jpg 1152w, https:\/\/courses.ideate.cmu.edu\/62-362\/f2021\/wp-content\/uploads\/2021\/10\/fin_handtop-1536x2048.jpg 1536w, https:\/\/courses.ideate.cmu.edu\/62-362\/f2021\/wp-content\/uploads\/2021\/10\/fin_handtop-973x1297.jpg 973w, https:\/\/courses.ideate.cmu.edu\/62-362\/f2021\/wp-content\/uploads\/2021\/10\/fin_handtop-508x677.jpg 508w, https:\/\/courses.ideate.cmu.edu\/62-362\/f2021\/wp-content\/uploads\/2021\/10\/fin_handtop-scaled.jpg 1920w\" sizes=\"(max-width: 225px) 100vw, 225px\" \/><p id=\"caption-attachment-11340\" class=\"wp-caption-text\">Robovend&#8217;s pads are all touch responsive<\/p><\/div>\n<h4><img loading=\"lazy\" class=\"alignnone size-medium wp-image-11342\" src=\"https:\/\/courses.ideate.cmu.edu\/62-362\/f2021\/wp-content\/uploads\/2021\/10\/fin_lightup-169x300.png\" alt=\"\" width=\"169\" height=\"300\" srcset=\"https:\/\/courses.ideate.cmu.edu\/62-362\/f2021\/wp-content\/uploads\/2021\/10\/fin_lightup-169x300.png 169w, https:\/\/courses.ideate.cmu.edu\/62-362\/f2021\/wp-content\/uploads\/2021\/10\/fin_lightup-576x1024.png 576w, https:\/\/courses.ideate.cmu.edu\/62-362\/f2021\/wp-content\/uploads\/2021\/10\/fin_lightup-768x1365.png 768w, https:\/\/courses.ideate.cmu.edu\/62-362\/f2021\/wp-content\/uploads\/2021\/10\/fin_lightup-864x1536.png 864w, https:\/\/courses.ideate.cmu.edu\/62-362\/f2021\/wp-content\/uploads\/2021\/10\/fin_lightup-973x1730.png 973w, https:\/\/courses.ideate.cmu.edu\/62-362\/f2021\/wp-content\/uploads\/2021\/10\/fin_lightup-508x903.png 508w, https:\/\/courses.ideate.cmu.edu\/62-362\/f2021\/wp-content\/uploads\/2021\/10\/fin_lightup.png 1080w\" sizes=\"(max-width: 169px) 100vw, 169px\" \/><\/h4>\n<h4><img loading=\"lazy\" class=\"alignnone size-medium wp-image-11341\" src=\"https:\/\/courses.ideate.cmu.edu\/62-362\/f2021\/wp-content\/uploads\/2021\/10\/fin_inuse-300x201.jpg\" alt=\"\" width=\"300\" height=\"201\" srcset=\"https:\/\/courses.ideate.cmu.edu\/62-362\/f2021\/wp-content\/uploads\/2021\/10\/fin_inuse-300x201.jpg 300w, https:\/\/courses.ideate.cmu.edu\/62-362\/f2021\/wp-content\/uploads\/2021\/10\/fin_inuse-1024x684.jpg 1024w, https:\/\/courses.ideate.cmu.edu\/62-362\/f2021\/wp-content\/uploads\/2021\/10\/fin_inuse-768x513.jpg 768w, https:\/\/courses.ideate.cmu.edu\/62-362\/f2021\/wp-content\/uploads\/2021\/10\/fin_inuse-1536x1027.jpg 1536w, https:\/\/courses.ideate.cmu.edu\/62-362\/f2021\/wp-content\/uploads\/2021\/10\/fin_inuse-2048x1369.jpg 2048w, https:\/\/courses.ideate.cmu.edu\/62-362\/f2021\/wp-content\/uploads\/2021\/10\/fin_inuse-973x650.jpg 973w, https:\/\/courses.ideate.cmu.edu\/62-362\/f2021\/wp-content\/uploads\/2021\/10\/fin_inuse-508x340.jpg 508w\" sizes=\"(max-width: 300px) 100vw, 300px\" \/><\/h4>\n<h4><\/h4>\n<h3>Video<\/h3>\n<p><a href=\"https:\/\/www.youtube.com\/watch?v=8N-5hp1FVPY\">High Res Version: https:\/\/www.youtube.com\/watch?v=8N-5hp1FVPY<\/a><\/p>\n<p><a href=\"https:\/\/courses.ideate.cmu.edu\/62-362\/f2021\/wp-content\/uploads\/2021\/10\/IMG_29851.mov\">Uploaded to WordPress version<\/a><\/p>\n<h3>Code<\/h3>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"c\">\/* RoboVend - A vending machine for humans and robots\r\n* An ideate project by Andy Kong\r\n* \r\n* This code detects touches on its input pins, turns on LEDs\r\n* according to which pads are touched, and recognizes\r\n* a preprogrammed code to turn the motor driver on. \r\n* \r\n* Shoutout to FastTouch, really made my life easier for doing touch detection\r\n*\/\r\n\r\n#include &lt;FastTouch.h&gt;\r\n\r\nint ledpins[] = {2,3,4,5,6};\r\nint touchpins[] = {7,8,9,10,11};\r\nconst int numtouchpins = 5;\r\nint lastTouches[numtouchpins];\r\n\r\nint palmPin = 11; \/\/ GND the palm pin\r\nint motPin = 13; \/\/ Pin that controls the transistor that powers the food dispenser\r\n\r\n\r\n\r\nvoid setup() {\r\n    Serial.begin(115200);\r\n\r\n    \/\/ Set up LED pins\r\n    for (int i = 0; i &lt; numtouchpins; i++){\r\n        pinMode(ledpins[i], OUTPUT);\r\n    }\r\n    pinMode(motPin, OUTPUT);\r\n    pinMode(palmPin, OUTPUT);\r\n    \r\n}\r\n\r\n\/\/ Create capacitive touch threshold for the fastTouchRead()\r\nint touchMargin = 1;\r\n\r\nvoid loop() {\r\n    Serial.println(\"New\");\r\n    \/\/ Read from all touch pads, and trigger their LED if they're past the touch threshold\r\n    for (int i = 0; i&lt; numtouchpins; i++){\r\n        lastTouches[i] = fastTouchRead(touchpins[i]);\r\n        Serial.print(\"\\t Pin \");\r\n        Serial.print(i);\r\n        Serial.print(\": \");\r\n        Serial.print(lastTouches[i]);\r\n        \r\n        \r\n        if (lastTouches[i] &gt;= touchMargin){\r\n            digitalWrite(ledpins[i], HIGH);\r\n            \/\/ Debuggery\r\n\/\/            Serial.println(\"pin \");\r\n\/\/            Serial.print(touchpins[i]);\r\n\/\/            Serial.println(\" turning on HIGH\");\r\n        } else{\r\n            digitalWrite(ledpins[i], LOW);\r\n            if (i == 0)\r\n                digitalWrite(motPin, LOW); \r\n        } \r\n    }\r\n\r\n    \/\/ Blink if the combination of pads is correct\r\n    if (lastTouches[0] &gt;= touchMargin &amp;&amp; lastTouches[1] &gt;= touchMargin &amp;&amp; lastTouches[2] == 0 &amp;&amp;\r\n           lastTouches[3] == 0 &amp;&amp; lastTouches[4] &gt;= touchMargin){\r\n        \/\/ Turning the motor for food dispenser-y\r\n        digitalWrite(motPin, HIGH); \r\n\r\n        \/\/ Beeping code\r\n        for (int i = 0; i &lt; numtouchpins; i++){\r\n            digitalWrite(ledpins[i], LOW);\r\n        } \r\n        delay(50);\r\n        digitalWrite(motPin, LOW); \r\n        delay(50);\r\n        digitalWrite(motPin, HIGH); \r\n        delay(50);\r\n        digitalWrite(motPin, LOW); \r\n        delay(50);\r\n        digitalWrite(motPin, HIGH); \r\n        delay(50);\r\n        digitalWrite(motPin, LOW); \r\n        \r\n        \/\/ Blinking code\r\n        for (int i = 0; i &lt; numtouchpins; i++){\r\n            if (i != 0){\r\n                digitalWrite(ledpins[i-1], LOW);\r\n            }\r\n            digitalWrite(ledpins[i], HIGH);\r\n            delay(100);\r\n        }\r\n        digitalWrite(ledpins[numtouchpins-1], LOW);\r\n        \r\n        for (int i = 0; i &lt; numtouchpins; i++){\r\n            if (i != 0){\r\n                digitalWrite(ledpins[i-1], LOW);\r\n            }\r\n            digitalWrite(ledpins[i], HIGH);\r\n            delay(100);\r\n        }\r\n    } else {\r\n        digitalWrite(motPin, LOW); \r\n    }\r\n    \r\n    delay(10);\r\n}<\/pre>\n<p>&nbsp;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Child Description This is a skinny black box about a foot tall, with the same shape as a desktop computer. It has a toothy gap down the left&#8230;<\/p>\n","protected":false},"author":136,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":[],"categories":[185,86],"tags":[],"_links":{"self":[{"href":"https:\/\/courses.ideate.cmu.edu\/62-362\/f2021\/wp-json\/wp\/v2\/posts\/11295"}],"collection":[{"href":"https:\/\/courses.ideate.cmu.edu\/62-362\/f2021\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/courses.ideate.cmu.edu\/62-362\/f2021\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/courses.ideate.cmu.edu\/62-362\/f2021\/wp-json\/wp\/v2\/users\/136"}],"replies":[{"embeddable":true,"href":"https:\/\/courses.ideate.cmu.edu\/62-362\/f2021\/wp-json\/wp\/v2\/comments?post=11295"}],"version-history":[{"count":11,"href":"https:\/\/courses.ideate.cmu.edu\/62-362\/f2021\/wp-json\/wp\/v2\/posts\/11295\/revisions"}],"predecessor-version":[{"id":11362,"href":"https:\/\/courses.ideate.cmu.edu\/62-362\/f2021\/wp-json\/wp\/v2\/posts\/11295\/revisions\/11362"}],"wp:attachment":[{"href":"https:\/\/courses.ideate.cmu.edu\/62-362\/f2021\/wp-json\/wp\/v2\/media?parent=11295"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/courses.ideate.cmu.edu\/62-362\/f2021\/wp-json\/wp\/v2\/categories?post=11295"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/courses.ideate.cmu.edu\/62-362\/f2021\/wp-json\/wp\/v2\/tags?post=11295"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}