{"id":15663,"date":"2022-03-16T10:09:33","date_gmt":"2022-03-16T14:09:33","guid":{"rendered":"https:\/\/courses.ideate.cmu.edu\/60-223\/s2022\/work\/?p=15663"},"modified":"2022-03-16T10:10:13","modified_gmt":"2022-03-16T14:10:13","slug":"the-nay-phone-inator","status":"publish","type":"post","link":"https:\/\/courses.ideate.cmu.edu\/60-223\/s2022\/work\/the-nay-phone-inator\/","title":{"rendered":"The Nay Phone Inator"},"content":{"rendered":"<p><span style=\"font-weight: 400\">A device to help lock away your phone for a specified amount of time so you can focus on tasks at hand.<\/span><\/p>\n<div style=\"width: 620px;\" class=\"wp-video\"><!--[if lt IE 9]><script>document.createElement('video');<\/script><![endif]-->\n<video class=\"wp-video-shortcode\" id=\"video-15663-1\" width=\"620\" height=\"482\" preload=\"metadata\" controls=\"controls\"><source type=\"video\/mp4\" src=\"https:\/\/courses.ideate.cmu.edu\/60-223\/s2022\/work\/wp-content\/uploads\/2022\/03\/normalfunction.mp4?_=1\" \/><a href=\"https:\/\/courses.ideate.cmu.edu\/60-223\/s2022\/work\/wp-content\/uploads\/2022\/03\/normalfunction.mp4\">https:\/\/courses.ideate.cmu.edu\/60-223\/s2022\/work\/wp-content\/uploads\/2022\/03\/normalfunction.mp4<\/a><\/video><\/div>\n<div style=\"width: 620px;\" class=\"wp-video\"><video class=\"wp-video-shortcode\" id=\"video-15663-2\" width=\"620\" height=\"489\" preload=\"metadata\" controls=\"controls\"><source type=\"video\/mp4\" src=\"https:\/\/courses.ideate.cmu.edu\/60-223\/s2022\/work\/wp-content\/uploads\/2022\/03\/otheroptionbutton.mp4?_=2\" \/><a href=\"https:\/\/courses.ideate.cmu.edu\/60-223\/s2022\/work\/wp-content\/uploads\/2022\/03\/otheroptionbutton.mp4\">https:\/\/courses.ideate.cmu.edu\/60-223\/s2022\/work\/wp-content\/uploads\/2022\/03\/otheroptionbutton.mp4<\/a><\/video><\/div>\n<div id=\"attachment_15695\" style=\"width: 644px\" class=\"wp-caption aligncenter\"><img aria-describedby=\"caption-attachment-15695\" loading=\"lazy\" class=\"wp-image-15695 size-full\" src=\"https:\/\/courses.ideate.cmu.edu\/60-223\/s2022\/work\/wp-content\/uploads\/2022\/03\/overallphoto.jpg\" alt=\"\" width=\"634\" height=\"410\" srcset=\"https:\/\/courses.ideate.cmu.edu\/60-223\/s2022\/work\/wp-content\/uploads\/2022\/03\/overallphoto.jpg 634w, https:\/\/courses.ideate.cmu.edu\/60-223\/s2022\/work\/wp-content\/uploads\/2022\/03\/overallphoto-300x194.jpg 300w, https:\/\/courses.ideate.cmu.edu\/60-223\/s2022\/work\/wp-content\/uploads\/2022\/03\/overallphoto-508x329.jpg 508w\" sizes=\"(max-width: 634px) 100vw, 634px\" \/><p id=\"caption-attachment-15695\" class=\"wp-caption-text\">An overall photo for portion and scale.<\/p><\/div>\n<div id=\"attachment_15680\" style=\"width: 2570px\" class=\"wp-caption aligncenter\"><img aria-describedby=\"caption-attachment-15680\" loading=\"lazy\" class=\"size-full wp-image-15680\" src=\"https:\/\/courses.ideate.cmu.edu\/60-223\/s2022\/work\/wp-content\/uploads\/2022\/03\/IMG_1885-preview-scaled.jpg\" alt=\"\" width=\"2560\" height=\"1920\" srcset=\"https:\/\/courses.ideate.cmu.edu\/60-223\/s2022\/work\/wp-content\/uploads\/2022\/03\/IMG_1885-preview-scaled.jpg 2560w, https:\/\/courses.ideate.cmu.edu\/60-223\/s2022\/work\/wp-content\/uploads\/2022\/03\/IMG_1885-preview-300x225.jpg 300w, https:\/\/courses.ideate.cmu.edu\/60-223\/s2022\/work\/wp-content\/uploads\/2022\/03\/IMG_1885-preview-1024x768.jpg 1024w, https:\/\/courses.ideate.cmu.edu\/60-223\/s2022\/work\/wp-content\/uploads\/2022\/03\/IMG_1885-preview-768x576.jpg 768w, https:\/\/courses.ideate.cmu.edu\/60-223\/s2022\/work\/wp-content\/uploads\/2022\/03\/IMG_1885-preview-1536x1152.jpg 1536w, https:\/\/courses.ideate.cmu.edu\/60-223\/s2022\/work\/wp-content\/uploads\/2022\/03\/IMG_1885-preview-2048x1536.jpg 2048w, https:\/\/courses.ideate.cmu.edu\/60-223\/s2022\/work\/wp-content\/uploads\/2022\/03\/IMG_1885-preview-973x730.jpg 973w, https:\/\/courses.ideate.cmu.edu\/60-223\/s2022\/work\/wp-content\/uploads\/2022\/03\/IMG_1885-preview-508x381.jpg 508w\" sizes=\"(max-width: 2560px) 100vw, 2560px\" \/><p id=\"caption-attachment-15680\" class=\"wp-caption-text\">The &#8220;self destruct&#8221; button<\/p><\/div>\n<div id=\"attachment_15679\" style=\"width: 2570px\" class=\"wp-caption aligncenter\"><img aria-describedby=\"caption-attachment-15679\" loading=\"lazy\" class=\"size-full wp-image-15679\" src=\"https:\/\/courses.ideate.cmu.edu\/60-223\/s2022\/work\/wp-content\/uploads\/2022\/03\/ledstrip-scaled.jpg\" alt=\"\" width=\"2560\" height=\"1920\" srcset=\"https:\/\/courses.ideate.cmu.edu\/60-223\/s2022\/work\/wp-content\/uploads\/2022\/03\/ledstrip-scaled.jpg 2560w, https:\/\/courses.ideate.cmu.edu\/60-223\/s2022\/work\/wp-content\/uploads\/2022\/03\/ledstrip-300x225.jpg 300w, https:\/\/courses.ideate.cmu.edu\/60-223\/s2022\/work\/wp-content\/uploads\/2022\/03\/ledstrip-1024x768.jpg 1024w, https:\/\/courses.ideate.cmu.edu\/60-223\/s2022\/work\/wp-content\/uploads\/2022\/03\/ledstrip-768x576.jpg 768w, https:\/\/courses.ideate.cmu.edu\/60-223\/s2022\/work\/wp-content\/uploads\/2022\/03\/ledstrip-1536x1152.jpg 1536w, https:\/\/courses.ideate.cmu.edu\/60-223\/s2022\/work\/wp-content\/uploads\/2022\/03\/ledstrip-2048x1536.jpg 2048w, https:\/\/courses.ideate.cmu.edu\/60-223\/s2022\/work\/wp-content\/uploads\/2022\/03\/ledstrip-973x730.jpg 973w, https:\/\/courses.ideate.cmu.edu\/60-223\/s2022\/work\/wp-content\/uploads\/2022\/03\/ledstrip-508x381.jpg 508w\" sizes=\"(max-width: 2560px) 100vw, 2560px\" \/><p id=\"caption-attachment-15679\" class=\"wp-caption-text\">The LED strip on a wall of the box.<\/p><\/div>\n<div id=\"attachment_15678\" style=\"width: 2570px\" class=\"wp-caption aligncenter\"><img aria-describedby=\"caption-attachment-15678\" loading=\"lazy\" class=\"wp-image-15678 size-full\" src=\"https:\/\/courses.ideate.cmu.edu\/60-223\/s2022\/work\/wp-content\/uploads\/2022\/03\/dials-scaled.jpg\" alt=\"\" width=\"2560\" height=\"1920\" srcset=\"https:\/\/courses.ideate.cmu.edu\/60-223\/s2022\/work\/wp-content\/uploads\/2022\/03\/dials-scaled.jpg 2560w, https:\/\/courses.ideate.cmu.edu\/60-223\/s2022\/work\/wp-content\/uploads\/2022\/03\/dials-300x225.jpg 300w, https:\/\/courses.ideate.cmu.edu\/60-223\/s2022\/work\/wp-content\/uploads\/2022\/03\/dials-1024x768.jpg 1024w, https:\/\/courses.ideate.cmu.edu\/60-223\/s2022\/work\/wp-content\/uploads\/2022\/03\/dials-768x576.jpg 768w, https:\/\/courses.ideate.cmu.edu\/60-223\/s2022\/work\/wp-content\/uploads\/2022\/03\/dials-1536x1152.jpg 1536w, https:\/\/courses.ideate.cmu.edu\/60-223\/s2022\/work\/wp-content\/uploads\/2022\/03\/dials-2048x1536.jpg 2048w, https:\/\/courses.ideate.cmu.edu\/60-223\/s2022\/work\/wp-content\/uploads\/2022\/03\/dials-973x730.jpg 973w, https:\/\/courses.ideate.cmu.edu\/60-223\/s2022\/work\/wp-content\/uploads\/2022\/03\/dials-508x381.jpg 508w\" sizes=\"(max-width: 2560px) 100vw, 2560px\" \/><p id=\"caption-attachment-15678\" class=\"wp-caption-text\">The Hour and Minute dials as well as the Set button.<\/p><\/div>\n<div id=\"attachment_15681\" style=\"width: 2570px\" class=\"wp-caption aligncenter\"><img aria-describedby=\"caption-attachment-15681\" loading=\"lazy\" class=\"size-full wp-image-15681\" src=\"https:\/\/courses.ideate.cmu.edu\/60-223\/s2022\/work\/wp-content\/uploads\/2022\/03\/the-use-scaled.jpeg\" alt=\"\" width=\"2560\" height=\"1920\" srcset=\"https:\/\/courses.ideate.cmu.edu\/60-223\/s2022\/work\/wp-content\/uploads\/2022\/03\/the-use-scaled.jpeg 2560w, https:\/\/courses.ideate.cmu.edu\/60-223\/s2022\/work\/wp-content\/uploads\/2022\/03\/the-use-300x225.jpeg 300w, https:\/\/courses.ideate.cmu.edu\/60-223\/s2022\/work\/wp-content\/uploads\/2022\/03\/the-use-1024x768.jpeg 1024w, https:\/\/courses.ideate.cmu.edu\/60-223\/s2022\/work\/wp-content\/uploads\/2022\/03\/the-use-768x576.jpeg 768w, https:\/\/courses.ideate.cmu.edu\/60-223\/s2022\/work\/wp-content\/uploads\/2022\/03\/the-use-1536x1152.jpeg 1536w, https:\/\/courses.ideate.cmu.edu\/60-223\/s2022\/work\/wp-content\/uploads\/2022\/03\/the-use-2048x1536.jpeg 2048w, https:\/\/courses.ideate.cmu.edu\/60-223\/s2022\/work\/wp-content\/uploads\/2022\/03\/the-use-973x730.jpeg 973w, https:\/\/courses.ideate.cmu.edu\/60-223\/s2022\/work\/wp-content\/uploads\/2022\/03\/the-use-508x381.jpeg 508w\" sizes=\"(max-width: 2560px) 100vw, 2560px\" \/><p id=\"caption-attachment-15681\" class=\"wp-caption-text\">The use of the LCD screen. This shows the main feature which is the Set Timer feature, it also shows the top unlocked (i.e. the servo lock is down)<\/p><\/div>\n<h1>Process Images and Review<\/h1>\n<div id=\"attachment_15675\" style=\"width: 760px\" class=\"wp-caption aligncenter\"><img aria-describedby=\"caption-attachment-15675\" loading=\"lazy\" class=\"wp-image-15675 size-full\" src=\"https:\/\/courses.ideate.cmu.edu\/60-223\/s2022\/work\/wp-content\/uploads\/2022\/03\/decision1.png\" alt=\"\" width=\"750\" height=\"1334\" srcset=\"https:\/\/courses.ideate.cmu.edu\/60-223\/s2022\/work\/wp-content\/uploads\/2022\/03\/decision1.png 750w, https:\/\/courses.ideate.cmu.edu\/60-223\/s2022\/work\/wp-content\/uploads\/2022\/03\/decision1-169x300.png 169w, https:\/\/courses.ideate.cmu.edu\/60-223\/s2022\/work\/wp-content\/uploads\/2022\/03\/decision1-576x1024.png 576w, https:\/\/courses.ideate.cmu.edu\/60-223\/s2022\/work\/wp-content\/uploads\/2022\/03\/decision1-508x904.png 508w\" sizes=\"(max-width: 750px) 100vw, 750px\" \/><p id=\"caption-attachment-15675\" class=\"wp-caption-text\">This was a decision point when I determined that two rotary encoders was better than one. This was a big decision because I always intended to use 1 and utilize the button feature on the encoder to switch between hours and minutes &#8211; but I realized that using 2 was much more efficient.<\/p><\/div>\n<div id=\"attachment_15671\" style=\"width: 1930px\" class=\"wp-caption aligncenter\"><img aria-describedby=\"caption-attachment-15671\" loading=\"lazy\" class=\"size-full wp-image-15671\" src=\"https:\/\/courses.ideate.cmu.edu\/60-223\/s2022\/work\/wp-content\/uploads\/2022\/03\/decisionPoint1-scaled.jpg\" alt=\"self destruct button\" width=\"1920\" height=\"2560\" srcset=\"https:\/\/courses.ideate.cmu.edu\/60-223\/s2022\/work\/wp-content\/uploads\/2022\/03\/decisionPoint1-scaled.jpg 1920w, https:\/\/courses.ideate.cmu.edu\/60-223\/s2022\/work\/wp-content\/uploads\/2022\/03\/decisionPoint1-225x300.jpg 225w, https:\/\/courses.ideate.cmu.edu\/60-223\/s2022\/work\/wp-content\/uploads\/2022\/03\/decisionPoint1-768x1024.jpg 768w, https:\/\/courses.ideate.cmu.edu\/60-223\/s2022\/work\/wp-content\/uploads\/2022\/03\/decisionPoint1-1152x1536.jpg 1152w, https:\/\/courses.ideate.cmu.edu\/60-223\/s2022\/work\/wp-content\/uploads\/2022\/03\/decisionPoint1-1536x2048.jpg 1536w, https:\/\/courses.ideate.cmu.edu\/60-223\/s2022\/work\/wp-content\/uploads\/2022\/03\/decisionPoint1-973x1297.jpg 973w, https:\/\/courses.ideate.cmu.edu\/60-223\/s2022\/work\/wp-content\/uploads\/2022\/03\/decisionPoint1-508x677.jpg 508w\" sizes=\"(max-width: 1920px) 100vw, 1920px\" \/><p id=\"caption-attachment-15671\" class=\"wp-caption-text\">This was a major decision point. Due to how hard it was for me to get the timer to work properly, I had originally scrapped the idea of a self destruct button. However, I really wanted to cover the use case of me needing my phone before time was up so I took a leap even though I was low on time &#8211; and included the self-destruct button\/all of it&#8217;s code.<\/p><\/div>\n<div id=\"attachment_15672\" style=\"width: 2570px\" class=\"wp-caption aligncenter\"><img aria-describedby=\"caption-attachment-15672\" loading=\"lazy\" class=\"size-full wp-image-15672\" src=\"https:\/\/courses.ideate.cmu.edu\/60-223\/s2022\/work\/wp-content\/uploads\/2022\/03\/first-process-image-scaled.jpg\" alt=\"first process image with components i intended to include\" width=\"2560\" height=\"1920\" srcset=\"https:\/\/courses.ideate.cmu.edu\/60-223\/s2022\/work\/wp-content\/uploads\/2022\/03\/first-process-image-scaled.jpg 2560w, https:\/\/courses.ideate.cmu.edu\/60-223\/s2022\/work\/wp-content\/uploads\/2022\/03\/first-process-image-300x225.jpg 300w, https:\/\/courses.ideate.cmu.edu\/60-223\/s2022\/work\/wp-content\/uploads\/2022\/03\/first-process-image-1024x768.jpg 1024w, https:\/\/courses.ideate.cmu.edu\/60-223\/s2022\/work\/wp-content\/uploads\/2022\/03\/first-process-image-768x576.jpg 768w, https:\/\/courses.ideate.cmu.edu\/60-223\/s2022\/work\/wp-content\/uploads\/2022\/03\/first-process-image-1536x1152.jpg 1536w, https:\/\/courses.ideate.cmu.edu\/60-223\/s2022\/work\/wp-content\/uploads\/2022\/03\/first-process-image-2048x1536.jpg 2048w, https:\/\/courses.ideate.cmu.edu\/60-223\/s2022\/work\/wp-content\/uploads\/2022\/03\/first-process-image-973x730.jpg 973w, https:\/\/courses.ideate.cmu.edu\/60-223\/s2022\/work\/wp-content\/uploads\/2022\/03\/first-process-image-508x381.jpg 508w\" sizes=\"(max-width: 2560px) 100vw, 2560px\" \/><p id=\"caption-attachment-15672\" class=\"wp-caption-text\">This is right when I started the assignment. The goal at this point was to get all of the components functioning on the Arduino singularly and then to have them signal to each other.<\/p><\/div>\n<div id=\"attachment_15673\" style=\"width: 1930px\" class=\"wp-caption aligncenter\"><img aria-describedby=\"caption-attachment-15673\" loading=\"lazy\" class=\"size-full wp-image-15673\" src=\"https:\/\/courses.ideate.cmu.edu\/60-223\/s2022\/work\/wp-content\/uploads\/2022\/03\/everythingworking-butthetimr-scaled.jpg\" alt=\"\" width=\"1920\" height=\"2560\" srcset=\"https:\/\/courses.ideate.cmu.edu\/60-223\/s2022\/work\/wp-content\/uploads\/2022\/03\/everythingworking-butthetimr-scaled.jpg 1920w, https:\/\/courses.ideate.cmu.edu\/60-223\/s2022\/work\/wp-content\/uploads\/2022\/03\/everythingworking-butthetimr-225x300.jpg 225w, https:\/\/courses.ideate.cmu.edu\/60-223\/s2022\/work\/wp-content\/uploads\/2022\/03\/everythingworking-butthetimr-768x1024.jpg 768w, https:\/\/courses.ideate.cmu.edu\/60-223\/s2022\/work\/wp-content\/uploads\/2022\/03\/everythingworking-butthetimr-1152x1536.jpg 1152w, https:\/\/courses.ideate.cmu.edu\/60-223\/s2022\/work\/wp-content\/uploads\/2022\/03\/everythingworking-butthetimr-1536x2048.jpg 1536w, https:\/\/courses.ideate.cmu.edu\/60-223\/s2022\/work\/wp-content\/uploads\/2022\/03\/everythingworking-butthetimr-973x1297.jpg 973w, https:\/\/courses.ideate.cmu.edu\/60-223\/s2022\/work\/wp-content\/uploads\/2022\/03\/everythingworking-butthetimr-508x677.jpg 508w\" sizes=\"(max-width: 1920px) 100vw, 1920px\" \/><p id=\"caption-attachment-15673\" class=\"wp-caption-text\">At this point, all of the components worked (servo, LED strip, etc.) except the timer didn&#8217;t function properly so nothing worked &#8220;together&#8221;.<\/p><\/div>\n<div id=\"attachment_15674\" style=\"width: 1930px\" class=\"wp-caption aligncenter\"><img aria-describedby=\"caption-attachment-15674\" loading=\"lazy\" class=\"size-full wp-image-15674\" src=\"https:\/\/courses.ideate.cmu.edu\/60-223\/s2022\/work\/wp-content\/uploads\/2022\/03\/timerworking-scaled.jpg\" alt=\"\" width=\"1920\" height=\"2560\" srcset=\"https:\/\/courses.ideate.cmu.edu\/60-223\/s2022\/work\/wp-content\/uploads\/2022\/03\/timerworking-scaled.jpg 1920w, https:\/\/courses.ideate.cmu.edu\/60-223\/s2022\/work\/wp-content\/uploads\/2022\/03\/timerworking-225x300.jpg 225w, https:\/\/courses.ideate.cmu.edu\/60-223\/s2022\/work\/wp-content\/uploads\/2022\/03\/timerworking-768x1024.jpg 768w, https:\/\/courses.ideate.cmu.edu\/60-223\/s2022\/work\/wp-content\/uploads\/2022\/03\/timerworking-1152x1536.jpg 1152w, https:\/\/courses.ideate.cmu.edu\/60-223\/s2022\/work\/wp-content\/uploads\/2022\/03\/timerworking-1536x2048.jpg 1536w, https:\/\/courses.ideate.cmu.edu\/60-223\/s2022\/work\/wp-content\/uploads\/2022\/03\/timerworking-973x1297.jpg 973w, https:\/\/courses.ideate.cmu.edu\/60-223\/s2022\/work\/wp-content\/uploads\/2022\/03\/timerworking-508x677.jpg 508w\" sizes=\"(max-width: 1920px) 100vw, 1920px\" \/><p id=\"caption-attachment-15674\" class=\"wp-caption-text\">This is after Zach walked me through the logic of the timer and I was finally able to code it so it functioned properly.<\/p><\/div>\n<div id=\"attachment_15669\" style=\"width: 1930px\" class=\"wp-caption aligncenter\"><img aria-describedby=\"caption-attachment-15669\" loading=\"lazy\" class=\"size-full wp-image-15669\" src=\"https:\/\/courses.ideate.cmu.edu\/60-223\/s2022\/work\/wp-content\/uploads\/2022\/03\/processImage3-scaled.jpg\" alt=\"two walls of the box built and trying to fit wiring inside\" width=\"1920\" height=\"2560\" srcset=\"https:\/\/courses.ideate.cmu.edu\/60-223\/s2022\/work\/wp-content\/uploads\/2022\/03\/processImage3-scaled.jpg 1920w, https:\/\/courses.ideate.cmu.edu\/60-223\/s2022\/work\/wp-content\/uploads\/2022\/03\/processImage3-225x300.jpg 225w, https:\/\/courses.ideate.cmu.edu\/60-223\/s2022\/work\/wp-content\/uploads\/2022\/03\/processImage3-768x1024.jpg 768w, https:\/\/courses.ideate.cmu.edu\/60-223\/s2022\/work\/wp-content\/uploads\/2022\/03\/processImage3-1152x1536.jpg 1152w, https:\/\/courses.ideate.cmu.edu\/60-223\/s2022\/work\/wp-content\/uploads\/2022\/03\/processImage3-1536x2048.jpg 1536w, https:\/\/courses.ideate.cmu.edu\/60-223\/s2022\/work\/wp-content\/uploads\/2022\/03\/processImage3-973x1297.jpg 973w, https:\/\/courses.ideate.cmu.edu\/60-223\/s2022\/work\/wp-content\/uploads\/2022\/03\/processImage3-508x677.jpg 508w\" sizes=\"(max-width: 1920px) 100vw, 1920px\" \/><p id=\"caption-attachment-15669\" class=\"wp-caption-text\">This was the point at which the electrical components all worked, and the box had been laser cut, and the biggest concern was unwiring and rewiring everything to fit nicely inside the box, as well as getting the box to stay together as I did that.<\/p><\/div>\n<h1>Discussion<\/h1>\n<p><span style=\"font-weight: 400\">The in-class critiques that I got were mostly just positive attributes that classmates appreciated about the design. It didn\u2019t really give me much to move forward with, but it was good to have my design decisions validated. One person commented, \u201cI thought the name was very cool and I liked the use of a tactile button to control the timer.\u201d I really liked the idea of the project and what I was making so I put a lot of time into designing based on what I would like to use. I\u2019ve always wanted an \u201cinator\u201d so it seemed like a perfect time to create something like that\u2026 thus the name. Another person commented \u201cIt looks like a lot of the components of your project are working really well together. I also like the LED use\u201d. When conceptualizing this assignment, I wanted to create something simple enough that I could do everything I needed to do within the ~two week span we were allocated. Thus, all of the components of my project &#8211; the LED strip, the LCD screen and timer, the self-destruct button\u2026 It was all in an effort to finish the project on time and create something I\u2019d want to use. So I appreciated this comment because I sought to be very intentional.\u00a0<\/span><\/p>\n<p><span style=\"font-weight: 400\">This project was unexpectedly challenging. I anticipated a walk in the park on a day with old snow (fumbling\/tripping on dirty snow, a bit of slipping on ice &#8211; but ultimately being fine), but instead my casual walk included me getting wrapped up in a tornado and spit out at the end of the park. Thus, all of the components (LED strip, buttons\/dials, etc.) came together somewhat easily and overall didn\u2019t take more time than anticipated\u2026 but the timer was the tornado. I didn\u2019t expect the logic and coding of it to be some math-heavy and difficult. I worked an entire weekend without getting anywhere, and restarted the code from scratch twice to make it work. In retrospect, I would tell myself to not overthink the logic and to go down the math route rather than scenario planning for each individual component of the timer (hour, min, sec). I also wish I hadn\u2019t gotten too hung up on the timer &#8211; I think it would have benefitted me more to move onto the actual box\/laser cutting while I waited and tried to debug the timer. However once the timer was completed, all the other components came together within two days and there were no more major storms on my walk.<\/span><\/p>\n<p><span style=\"font-weight: 400\">Overall, I\u2019d say I\u2019m very proud of this project. It satisfied all of my goals and created a project that I honestly intend to use for years to come. In fact, I\u2019d say I satisfied my goals almost to a fault. After seeing other people\u2019s projects &#8211; I realized I could have gone even further. For example, I have a lamp that has 3 slots for USB\u2019s, so I didn\u2019t include a battery pack or an on\/off button on the Nay-Phone Inator, instead I just left it for a USB input because that is what fit my specific needs. Also things like what happens after the self destruct button is pushed. The idea was that after the self-destruct button and phone retrieval, you simply unplug the USB (because why would the device need to be on if you had given up?), but in the final critique some people seemed surprised that there was no way to return to the Set Timer screen after the phone was retrieved. So I think small things like that would actually be my Next Steps. I don\u2019t plan to build another iteration of the project, but if I did &#8211; I would address those small details.<\/span><\/p>\n<h1>Technical Information<\/h1>\n<p><img loading=\"lazy\" class=\"aligncenter size-full wp-image-15698\" src=\"https:\/\/courses.ideate.cmu.edu\/60-223\/s2022\/work\/wp-content\/uploads\/2022\/03\/Screen-Shot-2022-03-16-at-10.00.58-AM.png\" alt=\"\" width=\"1606\" height=\"810\" srcset=\"https:\/\/courses.ideate.cmu.edu\/60-223\/s2022\/work\/wp-content\/uploads\/2022\/03\/Screen-Shot-2022-03-16-at-10.00.58-AM.png 1606w, https:\/\/courses.ideate.cmu.edu\/60-223\/s2022\/work\/wp-content\/uploads\/2022\/03\/Screen-Shot-2022-03-16-at-10.00.58-AM-300x151.png 300w, https:\/\/courses.ideate.cmu.edu\/60-223\/s2022\/work\/wp-content\/uploads\/2022\/03\/Screen-Shot-2022-03-16-at-10.00.58-AM-1024x516.png 1024w, https:\/\/courses.ideate.cmu.edu\/60-223\/s2022\/work\/wp-content\/uploads\/2022\/03\/Screen-Shot-2022-03-16-at-10.00.58-AM-768x387.png 768w, https:\/\/courses.ideate.cmu.edu\/60-223\/s2022\/work\/wp-content\/uploads\/2022\/03\/Screen-Shot-2022-03-16-at-10.00.58-AM-1536x775.png 1536w, https:\/\/courses.ideate.cmu.edu\/60-223\/s2022\/work\/wp-content\/uploads\/2022\/03\/Screen-Shot-2022-03-16-at-10.00.58-AM-973x491.png 973w, https:\/\/courses.ideate.cmu.edu\/60-223\/s2022\/work\/wp-content\/uploads\/2022\/03\/Screen-Shot-2022-03-16-at-10.00.58-AM-508x256.png 508w\" sizes=\"(max-width: 1606px) 100vw, 1606px\" \/><\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\">\/*\r\nNay Phone Inator - Project 2\r\nNoni Shelton\r\nCode for a device that locks away your phone for a specified amount of time so you can focus on tasks at hand.\r\nCredit to Professor Zach \r\nCredit to the creators of the libraries I used \r\n*\/\r\n\r\n\/*\r\n    PIN MAPPING\r\n  pin   | mode   | description\r\n  ------|--------|------------\r\n  2      input    Rotary Encoder - hour\r\n  3      input    Rotary Encoder - hour\r\n  4      input    The lock (the Servo motor)\r\n  5      input    The \"Set\" button\r\n  13     input    The \"self destruct\" button\r\n  9      input    Rotary Encoder - minute\r\n  10     input    Rotary Encoder - minute\r\n\r\n*\/\r\n\r\n#include &lt;LiquidCrystal_I2C.h&gt;\r\n#include &lt;Wire.h&gt;\r\n#include &lt;Encoder.h&gt;\r\n#include &lt;PololuLedStrip.h&gt;\r\n#include &lt;Servo.h&gt;\r\nServo lockMotor;\r\n\r\nconst int SELF_DESTRUCT_BUTTON_PIN = 13;\r\nconst int SET_BUTTON_PIN = 5;\r\nconst int LOCKMOTORPIN = 4;\r\nunsigned long lcdTimer = 0;\r\nunsigned long ledStripTimerSinglecolor = 0;\r\nPololuLedStrip&lt;6&gt; ledStrip;\r\n\r\n\/\/ LED STRIP: Create a buffer for holding the colors (3 bytes per color).\r\n#define LED_COUNT 60\r\nrgb_color colors[LED_COUNT];\r\n\r\nint totalTimerSeconds = 0;\r\nint selfDestructButtonState = 0;\r\nint destructTimer = 0;\r\nbool timerCounting = true;\r\nbool countdownMode = false;\r\nbool doorLocked = false;\r\nbool endScreenPrintSequence = false;\r\nbool destructPassed = false;\r\n\r\nLiquidCrystal_I2C screen(0x27, 16, 2);\r\nEncoder knobHour(2, 3);\r\nEncoder knobMinute(9, 10);\r\n\r\nvoid setup() {\r\n  \/\/ put your setup code here, to run once:\r\n  Serial.begin(9600);\r\n#if defined(__AVR_ATtiny85__) &amp;&amp; (F_CPU == 16000000)\r\n  clock_prescale_set(clock_div_1);\r\n#endif\r\n  \/\/ END of Trinket-specific code.\r\n\r\n  \/\/initalizing pins\r\n  pinMode(SELF_DESTRUCT_BUTTON_PIN, INPUT);\r\n  lockMotor.attach(LOCKMOTORPIN);\r\n\r\n  \/\/inital timer\r\n  Serial.begin(9600);\r\n  screen.init();\r\n  screen.backlight();\r\n  screen.home();\r\n  screen.clear();\r\n\r\n  \/\/intro screen\r\n  screen.print(\"Nay-Phone Inator\");\r\n  delay(2000);\r\n  screen.clear();\r\n\r\n  \/\/set timer\r\n  screen.home();\r\n  screen.print(\"Set Timer\");\r\n  screen.setCursor(5, 1);\r\n  screen.print(\"00hr:00min\");\r\n\r\n}\r\n\r\nvoid loop() {\r\n\r\n  \/\/setting up the rotary encoders\r\n  int setTimerHour, setTimerMin;\r\n  setTimerHour = knobHour.read() \/ 4;\r\n  setTimerMin = knobMinute.read() \/ 4;\r\n\r\n  \/\/hour rotary encoder goes to 12 and loops around\r\n  if (setTimerHour &lt; 0) setTimerHour = 10;\r\n  else if (setTimerHour &gt; 10) setTimerHour = 0;\r\n\r\n  \/\/min rotary encoder goes to 12 and loops around\r\n  if (setTimerMin &lt; 0) setTimerMin = 60;\r\n  else if (setTimerMin &gt; 59) setTimerMin = 0;\r\n\r\n\r\n  \/\/bool sure set timer only prints once\r\n  if (endScreenPrintSequence == false) {\r\n\r\n    \/\/printing the \"Set Timer\" changing values\r\n    if (millis() - lcdTimer &gt;= 250) {\r\n      screen.clear();\r\n      screen.home();\r\n      screen.print(\"Set Timer\");\r\n      screen.setCursor(5, 1);\r\n      screen.print(\"00hr:00min\");\r\n\r\n      \/\/setting hours\r\n      if (setTimerHour &lt; 10) screen.setCursor(6, 1);\r\n      else screen.setCursor(5, 1);\r\n      screen.print(setTimerHour);\r\n\r\n      \/\/setting mins\r\n      if (setTimerMin &lt; 10) screen.setCursor(11, 1);\r\n      else screen.setCursor(10, 1);\r\n      screen.print(setTimerMin);\r\n\r\n      lcdTimer = millis();\r\n    }\r\n  }\r\n\r\n  \/\/LED STRIP: making the LED Strip Flash a rainbow if it's in SetTimer Mode\r\n  if (countdownMode == false) {\r\n\r\n    \/\/timer updates every 1\/4th of a second\r\n    if (millis() - lcdTimer &gt;= 250) {\r\n\r\n      \/\/ Update the colors.\r\n      uint16_t time = millis() &gt;&gt; 2;\r\n      for (uint16_t i = 0; i &lt; LED_COUNT; i++)\r\n      {\r\n        byte x = (time &gt;&gt; 2) - (i &lt;&lt; 3);\r\n        colors[i] = hsvToRgb((uint32_t)x * 359 \/ 256, 255, 255);\r\n      }\r\n\r\n      \/\/ Write the colors to the LED strip.\r\n      ledStrip.write(colors, LED_COUNT);\r\n    }\r\n  }\r\n\r\n\r\n  \/\/set button pressed -- i.e. moving on to the countdown timer\r\n  if (digitalRead(SET_BUTTON_PIN) == HIGH) countdownMode = true;\r\n\r\n  if (countdownMode) {\r\n\r\n    \/\/updates every 1 second\r\n    if (millis() - lcdTimer &gt;= 100) {\r\n      screen.clear();\r\n      screen.home();\r\n      screen.print(\"Timer\");\r\n      screen.setCursor(4, 1);\r\n      screen.print(\"00:00:00\");\r\n      lcdTimer = millis();\r\n\r\n      if (timerCounting) {\r\n        totalTimerSeconds = ((setTimerHour * 3600) + (setTimerMin * 60));\r\n        timerCounting = false;\r\n      }\r\n\r\n      \/\/every second, the hours\/mins\/seconds are updated\r\n      totalTimerSeconds--;\r\n      \/\/updates seconds\r\n      int seconds = totalTimerSeconds;\r\n      \/\/updates hours\r\n      int hourUpdate = seconds \/ 3600;\r\n      seconds = seconds - (hourUpdate * 3600);\r\n      \/\/updates minutes\r\n      int minUpdate = seconds \/ 60;\r\n      seconds = seconds - (minUpdate * 60);\r\n\r\n      if (totalTimerSeconds &gt;= 0) {\r\n\r\n        \/\/servo motor: locking the door --\r\n        lockMotor.write(5);\r\n\r\n        \/\/led strip turns red\r\n        for (uint16_t i = 0; i &lt; LED_COUNT; i++) {\r\n          colors[i] = rgb_color(255, 0, 0);\r\n        }\r\n\r\n        \/\/Updating the timer on the LCD Screen\r\n        \/\/printing the seconds\r\n        screen.setCursor(10, 1);\r\n        if (seconds &lt; 10) screen.setCursor(11, 1);\r\n        else screen.setCursor(10, 1);\r\n        screen.print(seconds);\r\n\r\n        \/\/printing the mins\r\n        if (minUpdate &lt; 10) screen.setCursor(8, 1);\r\n        else screen.setCursor(7, 1);\r\n        screen.print(minUpdate);\r\n\r\n        \/\/printing the hours\r\n        if (hourUpdate &lt; 10) screen.setCursor(5, 1);\r\n        else screen.setCursor(4, 1);\r\n        screen.print(hourUpdate);\r\n\r\n        \/\/SELF DESTRUCT MODE\r\n        selfDestructButtonState = digitalRead(SELF_DESTRUCT_BUTTON_PIN);\r\n\r\n        if (selfDestructButtonState == HIGH) {\r\n\r\n          \/\/setting a destruct countdown\r\n          destructTimer++;\r\n\r\n          \/\/making sure the screen prints the proper thing\r\n          endScreenPrintSequence = true;\r\n\r\n          if (destructTimer &lt; 10) {\r\n\r\n            \/\/destruct timer displays warning\r\n            screen.clear();\r\n            screen.print(\"Hold for 10 secs\");\r\n            screen.setCursor(0, 1);\r\n            screen.print(\"to give up\");\r\n            delay(1000);\r\n          }\r\n\r\n          else {\r\n\r\n            \/\/passing the destruct bool\r\n            destructPassed = true;\r\n          }\r\n        }\r\n\r\n        if (destructPassed) {\r\n\r\n          \/\/destruct timer displays disappointment\r\n          screen.clear();\r\n          screen.print(\"Dang. That was\");\r\n          screen.setCursor(0, 1);\r\n          screen.print(\"disappointing.\");\r\n          delay(1000);\r\n\r\n          \/\/servo motor: unlock the door\r\n\r\n          lockMotor.write(90);\r\n          delay(1000);\r\n\r\n        }\r\n\r\n      }\r\n\r\n      else {\r\n        \/\/TIMER HAS BEEN ENDED\r\n\r\n        \/\/making sure the screen prints the proper thing\r\n        endScreenPrintSequence = true;\r\n\r\n        screen.clear();\r\n        screen.home();\r\n        screen.print(\"Amazing job! You\");\r\n        screen.setCursor(0, 1);\r\n        screen.print(\"rock homie\");\r\n\r\n        \/\/servo motor: unlock the door\r\n\r\n        lockMotor.write(90);\r\n        delay(1000);\r\n\r\n        \/\/LED STRIP: updating the LED strip with congratulatory colors\r\n        \/\/ Update the colors.\r\n        byte time = millis() &gt;&gt; 2;\r\n        for (uint16_t i = 0; i &lt; LED_COUNT; i++)\r\n        {\r\n          byte x = time - 8 * i;\r\n          colors[i] = rgb_color(x, 255 - x, x);\r\n        }\r\n      }\r\n      \/\/ Write the colors to the LED strip.\r\n      ledStrip.write(colors, LED_COUNT);\r\n    }\r\n  }\r\n}\r\n\r\n\/\/ THE FUNCTIONS I'M USING\r\n\r\n\/\/ Converts a color from HSV to RGB.\r\n\/\/ h is hue, as a number between 0 and 360.\r\n\/\/ s is the saturation, as a number between 0 and 255.\r\n\/\/ v is the value, as a number between 0 and 255.\r\nrgb_color hsvToRgb(uint16_t h, uint8_t s, uint8_t v)\r\n{\r\n  uint8_t f = (h % 60) * 255 \/ 60;\r\n  uint8_t p = (255 - s) * (uint16_t)v \/ 255;\r\n  uint8_t q = (255 - f * (uint16_t)s \/ 255) * (uint16_t)v \/ 255;\r\n  uint8_t t = (255 - (255 - f) * (uint16_t)s \/ 255) * (uint16_t)v \/ 255;\r\n  uint8_t r = 0, g = 0, b = 0;\r\n  switch ((h \/ 60) % 6) {\r\n    case 0: r = v; g = t; b = p; break;\r\n    case 1: r = q; g = v; b = p; break;\r\n    case 2: r = p; g = v; b = t; break;\r\n    case 3: r = p; g = q; b = v; break;\r\n    case 4: r = t; g = p; b = v; break;\r\n    case 5: r = v; g = p; b = q; break;\r\n  }\r\n  return rgb_color(r, g, b);\r\n}<\/pre>\n<p>&nbsp;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>A device to help lock away your phone for a specified amount of time so you can focus on tasks at hand. Process Images and Review Discussion The&#8230;<\/p>\n","protected":false},"author":214,"featured_media":15695,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":[],"categories":[89],"tags":[],"_links":{"self":[{"href":"https:\/\/courses.ideate.cmu.edu\/60-223\/s2022\/work\/wp-json\/wp\/v2\/posts\/15663"}],"collection":[{"href":"https:\/\/courses.ideate.cmu.edu\/60-223\/s2022\/work\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/courses.ideate.cmu.edu\/60-223\/s2022\/work\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/courses.ideate.cmu.edu\/60-223\/s2022\/work\/wp-json\/wp\/v2\/users\/214"}],"replies":[{"embeddable":true,"href":"https:\/\/courses.ideate.cmu.edu\/60-223\/s2022\/work\/wp-json\/wp\/v2\/comments?post=15663"}],"version-history":[{"count":6,"href":"https:\/\/courses.ideate.cmu.edu\/60-223\/s2022\/work\/wp-json\/wp\/v2\/posts\/15663\/revisions"}],"predecessor-version":[{"id":15699,"href":"https:\/\/courses.ideate.cmu.edu\/60-223\/s2022\/work\/wp-json\/wp\/v2\/posts\/15663\/revisions\/15699"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/courses.ideate.cmu.edu\/60-223\/s2022\/work\/wp-json\/wp\/v2\/media\/15695"}],"wp:attachment":[{"href":"https:\/\/courses.ideate.cmu.edu\/60-223\/s2022\/work\/wp-json\/wp\/v2\/media?parent=15663"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/courses.ideate.cmu.edu\/60-223\/s2022\/work\/wp-json\/wp\/v2\/categories?post=15663"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/courses.ideate.cmu.edu\/60-223\/s2022\/work\/wp-json\/wp\/v2\/tags?post=15663"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}