{"id":16426,"date":"2022-10-26T22:16:00","date_gmt":"2022-10-27T02:16:00","guid":{"rendered":"https:\/\/courses.ideate.cmu.edu\/60-223\/f2022\/work\/?p=16426"},"modified":"2022-10-27T01:49:19","modified_gmt":"2022-10-27T05:49:19","slug":"shoot-what-time-is-it","status":"publish","type":"post","link":"https:\/\/courses.ideate.cmu.edu\/60-223\/f2022\/work\/shoot-what-time-is-it\/","title":{"rendered":"Shoot, what time is it?!"},"content":{"rendered":"<p>My assistive device is an alarm clock that requires the user to aim a nerf gun to a target attached to the clock to stop the alarm.<\/p>\n<p>&nbsp;<\/p>\n<div id=\"attachment_16506\" style=\"width: 490px\" class=\"wp-caption alignnone\"><img aria-describedby=\"caption-attachment-16506\" loading=\"lazy\" class=\"wp-image-16506 size-full\" src=\"https:\/\/courses.ideate.cmu.edu\/60-223\/f2022\/work\/wp-content\/uploads\/2022\/10\/MVI_6640_1_AdobeExpress.gif\" alt=\"\" width=\"480\" height=\"270\" \/><p id=\"caption-attachment-16506\" class=\"wp-caption-text\">GIF of the project working at times x4 (I used my finger instead of the nerf gun to stop the alarm but it is the same mechanism)<\/p><\/div>\n<p>I couldn&#8217;t attach the original video due to file size so I will attach a link: https:\/\/youtu.be\/Qz9fStl4Iwg<\/p>\n<div id=\"attachment_16474\" style=\"width: 630px\" class=\"wp-caption alignnone\"><img aria-describedby=\"caption-attachment-16474\" loading=\"lazy\" class=\"wp-image-16474 size-large\" src=\"https:\/\/courses.ideate.cmu.edu\/60-223\/f2022\/work\/wp-content\/uploads\/2022\/10\/Overview-1024x683.jpg\" alt=\"\" width=\"620\" height=\"414\" srcset=\"https:\/\/courses.ideate.cmu.edu\/60-223\/f2022\/work\/wp-content\/uploads\/2022\/10\/Overview-1024x683.jpg 1024w, https:\/\/courses.ideate.cmu.edu\/60-223\/f2022\/work\/wp-content\/uploads\/2022\/10\/Overview-300x200.jpg 300w, https:\/\/courses.ideate.cmu.edu\/60-223\/f2022\/work\/wp-content\/uploads\/2022\/10\/Overview-768x512.jpg 768w, https:\/\/courses.ideate.cmu.edu\/60-223\/f2022\/work\/wp-content\/uploads\/2022\/10\/Overview-1536x1024.jpg 1536w, https:\/\/courses.ideate.cmu.edu\/60-223\/f2022\/work\/wp-content\/uploads\/2022\/10\/Overview-2048x1365.jpg 2048w, https:\/\/courses.ideate.cmu.edu\/60-223\/f2022\/work\/wp-content\/uploads\/2022\/10\/Overview-973x649.jpg 973w, https:\/\/courses.ideate.cmu.edu\/60-223\/f2022\/work\/wp-content\/uploads\/2022\/10\/Overview-508x339.jpg 508w\" sizes=\"(max-width: 620px) 100vw, 620px\" \/><p id=\"caption-attachment-16474\" class=\"wp-caption-text\">Overview photo<\/p><\/div>\n<p>&nbsp;<\/p>\n<div id=\"attachment_16475\" style=\"width: 630px\" class=\"wp-caption alignnone\"><img aria-describedby=\"caption-attachment-16475\" loading=\"lazy\" class=\"wp-image-16475 size-large\" src=\"https:\/\/courses.ideate.cmu.edu\/60-223\/f2022\/work\/wp-content\/uploads\/2022\/10\/Detail1-1024x683.jpg\" alt=\"\" width=\"620\" height=\"414\" srcset=\"https:\/\/courses.ideate.cmu.edu\/60-223\/f2022\/work\/wp-content\/uploads\/2022\/10\/Detail1-1024x683.jpg 1024w, https:\/\/courses.ideate.cmu.edu\/60-223\/f2022\/work\/wp-content\/uploads\/2022\/10\/Detail1-300x200.jpg 300w, https:\/\/courses.ideate.cmu.edu\/60-223\/f2022\/work\/wp-content\/uploads\/2022\/10\/Detail1-768x512.jpg 768w, https:\/\/courses.ideate.cmu.edu\/60-223\/f2022\/work\/wp-content\/uploads\/2022\/10\/Detail1-1536x1024.jpg 1536w, https:\/\/courses.ideate.cmu.edu\/60-223\/f2022\/work\/wp-content\/uploads\/2022\/10\/Detail1-2048x1365.jpg 2048w, https:\/\/courses.ideate.cmu.edu\/60-223\/f2022\/work\/wp-content\/uploads\/2022\/10\/Detail1-973x649.jpg 973w, https:\/\/courses.ideate.cmu.edu\/60-223\/f2022\/work\/wp-content\/uploads\/2022\/10\/Detail1-508x339.jpg 508w\" sizes=\"(max-width: 620px) 100vw, 620px\" \/><p id=\"caption-attachment-16475\" class=\"wp-caption-text\">Detail 1 of the wiring seen from the outside through the acrylic walls<\/p><\/div>\n<div id=\"attachment_16476\" style=\"width: 630px\" class=\"wp-caption alignnone\"><img aria-describedby=\"caption-attachment-16476\" loading=\"lazy\" class=\"wp-image-16476 size-large\" src=\"https:\/\/courses.ideate.cmu.edu\/60-223\/f2022\/work\/wp-content\/uploads\/2022\/10\/detail2-1024x683.jpg\" alt=\"\" width=\"620\" height=\"414\" srcset=\"https:\/\/courses.ideate.cmu.edu\/60-223\/f2022\/work\/wp-content\/uploads\/2022\/10\/detail2-1024x683.jpg 1024w, https:\/\/courses.ideate.cmu.edu\/60-223\/f2022\/work\/wp-content\/uploads\/2022\/10\/detail2-300x200.jpg 300w, https:\/\/courses.ideate.cmu.edu\/60-223\/f2022\/work\/wp-content\/uploads\/2022\/10\/detail2-768x512.jpg 768w, https:\/\/courses.ideate.cmu.edu\/60-223\/f2022\/work\/wp-content\/uploads\/2022\/10\/detail2-1536x1024.jpg 1536w, https:\/\/courses.ideate.cmu.edu\/60-223\/f2022\/work\/wp-content\/uploads\/2022\/10\/detail2-2048x1365.jpg 2048w, https:\/\/courses.ideate.cmu.edu\/60-223\/f2022\/work\/wp-content\/uploads\/2022\/10\/detail2-973x649.jpg 973w, https:\/\/courses.ideate.cmu.edu\/60-223\/f2022\/work\/wp-content\/uploads\/2022\/10\/detail2-508x339.jpg 508w\" sizes=\"(max-width: 620px) 100vw, 620px\" \/><p id=\"caption-attachment-16476\" class=\"wp-caption-text\">Detail 2 of the buttons used to operate the clock and a buzzer on the right side wall <img loading=\"lazy\" class=\"wp-image-16479 size-large\" src=\"https:\/\/courses.ideate.cmu.edu\/60-223\/f2022\/work\/wp-content\/uploads\/2022\/10\/detail3-1024x683.jpg\" alt=\"\" width=\"620\" height=\"414\" srcset=\"https:\/\/courses.ideate.cmu.edu\/60-223\/f2022\/work\/wp-content\/uploads\/2022\/10\/detail3-1024x683.jpg 1024w, https:\/\/courses.ideate.cmu.edu\/60-223\/f2022\/work\/wp-content\/uploads\/2022\/10\/detail3-300x200.jpg 300w, https:\/\/courses.ideate.cmu.edu\/60-223\/f2022\/work\/wp-content\/uploads\/2022\/10\/detail3-768x512.jpg 768w, https:\/\/courses.ideate.cmu.edu\/60-223\/f2022\/work\/wp-content\/uploads\/2022\/10\/detail3-1536x1024.jpg 1536w, https:\/\/courses.ideate.cmu.edu\/60-223\/f2022\/work\/wp-content\/uploads\/2022\/10\/detail3-2048x1365.jpg 2048w, https:\/\/courses.ideate.cmu.edu\/60-223\/f2022\/work\/wp-content\/uploads\/2022\/10\/detail3-973x649.jpg 973w, https:\/\/courses.ideate.cmu.edu\/60-223\/f2022\/work\/wp-content\/uploads\/2022\/10\/detail3-508x339.jpg 508w\" sizes=\"(max-width: 620px) 100vw, 620px\" \/><\/p><\/div>\n<p>Detail 3 of the clock working as the claimed time matches the actual time (+ a close up of the LED at the center top)<\/p>\n<div id=\"attachment_16481\" style=\"width: 630px\" class=\"wp-caption alignnone\"><img aria-describedby=\"caption-attachment-16481\" loading=\"lazy\" class=\"wp-image-16481 size-large\" src=\"https:\/\/courses.ideate.cmu.edu\/60-223\/f2022\/work\/wp-content\/uploads\/2022\/10\/working1-1024x683.jpg\" alt=\"\" width=\"620\" height=\"414\" srcset=\"https:\/\/courses.ideate.cmu.edu\/60-223\/f2022\/work\/wp-content\/uploads\/2022\/10\/working1-1024x683.jpg 1024w, https:\/\/courses.ideate.cmu.edu\/60-223\/f2022\/work\/wp-content\/uploads\/2022\/10\/working1-300x200.jpg 300w, https:\/\/courses.ideate.cmu.edu\/60-223\/f2022\/work\/wp-content\/uploads\/2022\/10\/working1-768x512.jpg 768w, https:\/\/courses.ideate.cmu.edu\/60-223\/f2022\/work\/wp-content\/uploads\/2022\/10\/working1-1536x1024.jpg 1536w, https:\/\/courses.ideate.cmu.edu\/60-223\/f2022\/work\/wp-content\/uploads\/2022\/10\/working1-2048x1365.jpg 2048w, https:\/\/courses.ideate.cmu.edu\/60-223\/f2022\/work\/wp-content\/uploads\/2022\/10\/working1-973x649.jpg 973w, https:\/\/courses.ideate.cmu.edu\/60-223\/f2022\/work\/wp-content\/uploads\/2022\/10\/working1-508x339.jpg 508w\" sizes=\"(max-width: 620px) 100vw, 620px\" \/><p id=\"caption-attachment-16481\" class=\"wp-caption-text\">Photo aiming at the target<\/p><\/div>\n<div id=\"attachment_16483\" style=\"width: 630px\" class=\"wp-caption alignnone\"><img aria-describedby=\"caption-attachment-16483\" loading=\"lazy\" class=\"wp-image-16483 size-large\" src=\"https:\/\/courses.ideate.cmu.edu\/60-223\/f2022\/work\/wp-content\/uploads\/2022\/10\/working-1024x683.jpg\" alt=\"\" width=\"620\" height=\"414\" srcset=\"https:\/\/courses.ideate.cmu.edu\/60-223\/f2022\/work\/wp-content\/uploads\/2022\/10\/working-1024x683.jpg 1024w, https:\/\/courses.ideate.cmu.edu\/60-223\/f2022\/work\/wp-content\/uploads\/2022\/10\/working-300x200.jpg 300w, https:\/\/courses.ideate.cmu.edu\/60-223\/f2022\/work\/wp-content\/uploads\/2022\/10\/working-768x512.jpg 768w, https:\/\/courses.ideate.cmu.edu\/60-223\/f2022\/work\/wp-content\/uploads\/2022\/10\/working-1536x1024.jpg 1536w, https:\/\/courses.ideate.cmu.edu\/60-223\/f2022\/work\/wp-content\/uploads\/2022\/10\/working-2048x1365.jpg 2048w, https:\/\/courses.ideate.cmu.edu\/60-223\/f2022\/work\/wp-content\/uploads\/2022\/10\/working-973x649.jpg 973w, https:\/\/courses.ideate.cmu.edu\/60-223\/f2022\/work\/wp-content\/uploads\/2022\/10\/working-508x339.jpg 508w\" sizes=\"(max-width: 620px) 100vw, 620px\" \/><p id=\"caption-attachment-16483\" class=\"wp-caption-text\">Photo going through the target! (Bullseye!)<\/p><\/div>\n<h4 id=\"process-images-and-review\">Process Images and Review<\/h4>\n<p>These are my initial ideation sketch of the project:<\/p>\n<div id=\"attachment_16452\" style=\"width: 605px\" class=\"wp-caption alignnone\"><img aria-describedby=\"caption-attachment-16452\" loading=\"lazy\" class=\"wp-image-16452 size-full\" src=\"https:\/\/courses.ideate.cmu.edu\/60-223\/f2022\/work\/wp-content\/uploads\/2022\/10\/2022-10-26-19-49-1.jpg\" alt=\"\" width=\"595\" height=\"560\" srcset=\"https:\/\/courses.ideate.cmu.edu\/60-223\/f2022\/work\/wp-content\/uploads\/2022\/10\/2022-10-26-19-49-1.jpg 595w, https:\/\/courses.ideate.cmu.edu\/60-223\/f2022\/work\/wp-content\/uploads\/2022\/10\/2022-10-26-19-49-1-300x282.jpg 300w, https:\/\/courses.ideate.cmu.edu\/60-223\/f2022\/work\/wp-content\/uploads\/2022\/10\/2022-10-26-19-49-1-508x478.jpg 508w\" sizes=\"(max-width: 595px) 100vw, 595px\" \/><p id=\"caption-attachment-16452\" class=\"wp-caption-text\">Sketch 1 of ideation<\/p><\/div>\n<div id=\"attachment_16453\" style=\"width: 630px\" class=\"wp-caption alignnone\"><img aria-describedby=\"caption-attachment-16453\" loading=\"lazy\" class=\"wp-image-16453 size-large\" src=\"https:\/\/courses.ideate.cmu.edu\/60-223\/f2022\/work\/wp-content\/uploads\/2022\/10\/2022-10-26-19-49-1024x782.jpg\" alt=\"\" width=\"620\" height=\"473\" srcset=\"https:\/\/courses.ideate.cmu.edu\/60-223\/f2022\/work\/wp-content\/uploads\/2022\/10\/2022-10-26-19-49-1024x782.jpg 1024w, https:\/\/courses.ideate.cmu.edu\/60-223\/f2022\/work\/wp-content\/uploads\/2022\/10\/2022-10-26-19-49-300x229.jpg 300w, https:\/\/courses.ideate.cmu.edu\/60-223\/f2022\/work\/wp-content\/uploads\/2022\/10\/2022-10-26-19-49-768x587.jpg 768w, https:\/\/courses.ideate.cmu.edu\/60-223\/f2022\/work\/wp-content\/uploads\/2022\/10\/2022-10-26-19-49-1536x1173.jpg 1536w, https:\/\/courses.ideate.cmu.edu\/60-223\/f2022\/work\/wp-content\/uploads\/2022\/10\/2022-10-26-19-49-2048x1564.jpg 2048w, https:\/\/courses.ideate.cmu.edu\/60-223\/f2022\/work\/wp-content\/uploads\/2022\/10\/2022-10-26-19-49-973x743.jpg 973w, https:\/\/courses.ideate.cmu.edu\/60-223\/f2022\/work\/wp-content\/uploads\/2022\/10\/2022-10-26-19-49-508x388.jpg 508w\" sizes=\"(max-width: 620px) 100vw, 620px\" \/><p id=\"caption-attachment-16453\" class=\"wp-caption-text\">Sketch 2 of ideation<\/p><\/div>\n<p>And this is a prototype cardboard version of the alarm box that I made:<\/p>\n<div id=\"attachment_16456\" style=\"width: 630px\" class=\"wp-caption alignnone\"><img aria-describedby=\"caption-attachment-16456\" loading=\"lazy\" class=\"wp-image-16456 size-large\" src=\"https:\/\/courses.ideate.cmu.edu\/60-223\/f2022\/work\/wp-content\/uploads\/2022\/10\/IMG_6620-1024x986.jpg\" alt=\"\" width=\"620\" height=\"597\" srcset=\"https:\/\/courses.ideate.cmu.edu\/60-223\/f2022\/work\/wp-content\/uploads\/2022\/10\/IMG_6620-1024x986.jpg 1024w, https:\/\/courses.ideate.cmu.edu\/60-223\/f2022\/work\/wp-content\/uploads\/2022\/10\/IMG_6620-300x289.jpg 300w, https:\/\/courses.ideate.cmu.edu\/60-223\/f2022\/work\/wp-content\/uploads\/2022\/10\/IMG_6620-768x740.jpg 768w, https:\/\/courses.ideate.cmu.edu\/60-223\/f2022\/work\/wp-content\/uploads\/2022\/10\/IMG_6620-973x937.jpg 973w, https:\/\/courses.ideate.cmu.edu\/60-223\/f2022\/work\/wp-content\/uploads\/2022\/10\/IMG_6620-508x489.jpg 508w, https:\/\/courses.ideate.cmu.edu\/60-223\/f2022\/work\/wp-content\/uploads\/2022\/10\/IMG_6620.jpg 1080w\" sizes=\"(max-width: 620px) 100vw, 620px\" \/><p id=\"caption-attachment-16456\" class=\"wp-caption-text\">Box Prototype made before making the laser cut acrylic body<\/p><\/div>\n<p>My first decision point was when I started with four momentary buttons to set and control the alarm and the time. Of the four, two buttons increased and decreased the input numbers.<\/p>\n<div id=\"attachment_16443\" style=\"width: 630px\" class=\"wp-caption alignnone\"><img aria-describedby=\"caption-attachment-16443\" loading=\"lazy\" class=\"wp-image-16443 size-large\" src=\"https:\/\/courses.ideate.cmu.edu\/60-223\/f2022\/work\/wp-content\/uploads\/2022\/10\/IMG_5802-1024x948.jpg\" alt=\"\" width=\"620\" height=\"574\" srcset=\"https:\/\/courses.ideate.cmu.edu\/60-223\/f2022\/work\/wp-content\/uploads\/2022\/10\/IMG_5802-1024x948.jpg 1024w, https:\/\/courses.ideate.cmu.edu\/60-223\/f2022\/work\/wp-content\/uploads\/2022\/10\/IMG_5802-300x278.jpg 300w, https:\/\/courses.ideate.cmu.edu\/60-223\/f2022\/work\/wp-content\/uploads\/2022\/10\/IMG_5802-768x711.jpg 768w, https:\/\/courses.ideate.cmu.edu\/60-223\/f2022\/work\/wp-content\/uploads\/2022\/10\/IMG_5802-1536x1423.jpg 1536w, https:\/\/courses.ideate.cmu.edu\/60-223\/f2022\/work\/wp-content\/uploads\/2022\/10\/IMG_5802-2048x1897.jpg 2048w, https:\/\/courses.ideate.cmu.edu\/60-223\/f2022\/work\/wp-content\/uploads\/2022\/10\/IMG_5802-973x901.jpg 973w, https:\/\/courses.ideate.cmu.edu\/60-223\/f2022\/work\/wp-content\/uploads\/2022\/10\/IMG_5802-508x471.jpg 508w\" sizes=\"(max-width: 620px) 100vw, 620px\" \/><p id=\"caption-attachment-16443\" class=\"wp-caption-text\">Using four momentary buttons for control<\/p><\/div>\n<p>Although it was fine on the breadboard for the demonstration during the prototype stage, as I thought about putting four big buttons on a small container, I thought it made more sense that I convert the two + and &#8211; buttons to a single potentiometer. The time range was mapped to the potentiometer and that way it did not require holding down multiple buttons at once.<\/p>\n<p>Another decision point was when I decided to make a moving target instead of a static one. I attached the target to a motor that moves between 0 to 90 degrees back and forth.<\/p>\n<div id=\"attachment_16449\" style=\"width: 630px\" class=\"wp-caption alignnone\"><img aria-describedby=\"caption-attachment-16449\" loading=\"lazy\" class=\"wp-image-16449 size-large\" src=\"https:\/\/courses.ideate.cmu.edu\/60-223\/f2022\/work\/wp-content\/uploads\/2022\/10\/IMG_5880-861x1024.jpg\" alt=\"\" width=\"620\" height=\"737\" srcset=\"https:\/\/courses.ideate.cmu.edu\/60-223\/f2022\/work\/wp-content\/uploads\/2022\/10\/IMG_5880-861x1024.jpg 861w, https:\/\/courses.ideate.cmu.edu\/60-223\/f2022\/work\/wp-content\/uploads\/2022\/10\/IMG_5880-252x300.jpg 252w, https:\/\/courses.ideate.cmu.edu\/60-223\/f2022\/work\/wp-content\/uploads\/2022\/10\/IMG_5880-768x913.jpg 768w, https:\/\/courses.ideate.cmu.edu\/60-223\/f2022\/work\/wp-content\/uploads\/2022\/10\/IMG_5880-1292x1536.jpg 1292w, https:\/\/courses.ideate.cmu.edu\/60-223\/f2022\/work\/wp-content\/uploads\/2022\/10\/IMG_5880-1722x2048.jpg 1722w, https:\/\/courses.ideate.cmu.edu\/60-223\/f2022\/work\/wp-content\/uploads\/2022\/10\/IMG_5880-973x1157.jpg 973w, https:\/\/courses.ideate.cmu.edu\/60-223\/f2022\/work\/wp-content\/uploads\/2022\/10\/IMG_5880-508x604.jpg 508w\" sizes=\"(max-width: 620px) 100vw, 620px\" \/><p id=\"caption-attachment-16449\" class=\"wp-caption-text\">A failed attempt at getting the motor working with the clock (the motor works separately though)<\/p><\/div>\n<p>However, when I was trying to combine my two codes together I realized that because my motor code involved multiple &#8220;delay&#8221; code, the time would stop to rotate the target and resume again, which does not make a very useful clock. Although, I know how to fix this problem because we learned how to create a timer system using millis() instead of using multiple delay()s, I just could not finish editing the code in time.<\/p>\n<h3 id=\"discussion\">Discussion<\/h3>\n<p>After the critique, I noticed that I received a lot of comment regarding how to confirm my state of consciousness. One of the comments I received during the critique was to make some variation in the alarm sound in order to avoid my brain from gradually dismissing the same sound. I believed that this addition could be a great next step of the project. Because I originally planned on having a moving target, maybe I could have a set of tunes and the target will move differently everyday in sync with the tune. Although that sound quite challenging, I believe this addition would definitely wake me up.<\/p>\n<p>Another comment mentioned having to hit a target twice with some gap in between the first hit and the second hit. This feature I feel like is more feasible because inside the alarm setting function I just need to make it also go off a minute afterwards.\u00a0Although I don&#8217;t think I should add both features at once because then I would have to be a pro shooter, I think it would be interesting to have different &#8220;modes&#8221; and I could maybe choose between either of them depending on the occasion.<\/p>\n<p>In self-reflection, I am satisfied with how the project turned out because my goal was to just make it work, and it works! Well, sort of. It has its flaws\u2013like the motor not working properly\u2013and I wouldn&#8217;t say it is too user friendly either because it requires both hands and you need to keep your fingers pressed; however, my main personal goal was to have the big components working and making this image in my head come true in the real world, so during the given time I believe I did the best I could and it looks quite pretty too, so I am happy. \ud83d\ude42<\/p>\n<p>During the process, I feel like I already knew my limitations from the start. Wiring the parts together I could sort out by looking at the diagrams and past circuits we made in class but the actual coding was my biggest pain.<\/p>\n<p>I only have very rudimentary coding knowledge so a lot of my code was done with the help of the internet, which I cited. Therefore, most of the time I was trying to understand the different dynamics of the code and incorporate IR sensors into the system. Because my alarm clock already had a &#8220;kill&#8221;\u00a0 condition where if it senses the kill button being pressed it turns off the alarm, I did not think it would be difficult replacing that condition with the IR sensor reading &#8220;broken&#8221;.<\/p>\n<p>However, I came across a surprising obstacle: even if the Arduino reads the broken sensor the alarm will still go on because the time would still be the same. As in, if the timer was set to 20:00 and it goes off at 20:00 I would hit the bullseye at 20:00:15 and it would read the &#8220;broken&#8221; sensor but still buzz on because a full minute has not passed. I don&#8217;t think it would not have been a problem if I could also set the seconds. Eventually, the problem was fixed by creating a boolean variable and more dedicated functions.<\/p>\n<p>On the other hand, I enjoyed piecing the parts of the physical box together. Although I got a lot of help from Zach to make the fusion file, I enjoyed screwing in little tiny screws perfectly into the cut holes on the acrylic board. It was a nice rest between the hard coding and struggles to actually get the system working.<\/p>\n<p>As stressful as it was, it was also enjoyable to make because I have been thinking about this sort of odd house furniture for a while, so I definitely want to build another iteration of this project. As I mentioned in the beginning, I want to include different modes of alarm where I can choose in between settings to give myself a variety in waking myself up. Hopefully in the 2.0 version, I would get the motor working, and I also want to give the alarm some life and make it print out &#8220;:&gt; you failed!&#8221; or &#8220;\u2220( \u141b \u300d\u2220)\uff3f are you awake now?&#8221; messages as the alarm is going off.<\/p>\n<h3 id=\"technical-information\">Technical information<\/h3>\n<div id=\"attachment_16630\" style=\"width: 973px\" class=\"wp-caption alignnone\"><img aria-describedby=\"caption-attachment-16630\" loading=\"lazy\" class=\"wp-image-16630 size-full\" src=\"https:\/\/courses.ideate.cmu.edu\/60-223\/f2022\/work\/wp-content\/uploads\/2022\/10\/Untitled-Diagram-4.jpg\" alt=\"\" width=\"963\" height=\"772\" srcset=\"https:\/\/courses.ideate.cmu.edu\/60-223\/f2022\/work\/wp-content\/uploads\/2022\/10\/Untitled-Diagram-4.jpg 963w, https:\/\/courses.ideate.cmu.edu\/60-223\/f2022\/work\/wp-content\/uploads\/2022\/10\/Untitled-Diagram-4-300x240.jpg 300w, https:\/\/courses.ideate.cmu.edu\/60-223\/f2022\/work\/wp-content\/uploads\/2022\/10\/Untitled-Diagram-4-768x616.jpg 768w, https:\/\/courses.ideate.cmu.edu\/60-223\/f2022\/work\/wp-content\/uploads\/2022\/10\/Untitled-Diagram-4-508x407.jpg 508w\" sizes=\"(max-width: 963px) 100vw, 963px\" \/><p id=\"caption-attachment-16630\" class=\"wp-caption-text\">Block Diagram (motor included)<\/p><\/div>\n<p>&nbsp;<\/p>\n<div id=\"attachment_16628\" style=\"width: 1252px\" class=\"wp-caption alignnone\"><img aria-describedby=\"caption-attachment-16628\" loading=\"lazy\" class=\"wp-image-16628 size-full\" src=\"https:\/\/courses.ideate.cmu.edu\/60-223\/f2022\/work\/wp-content\/uploads\/2022\/10\/Untitled-Diagram-3.jpg\" alt=\"\" width=\"1242\" height=\"792\" srcset=\"https:\/\/courses.ideate.cmu.edu\/60-223\/f2022\/work\/wp-content\/uploads\/2022\/10\/Untitled-Diagram-3.jpg 1242w, https:\/\/courses.ideate.cmu.edu\/60-223\/f2022\/work\/wp-content\/uploads\/2022\/10\/Untitled-Diagram-3-300x191.jpg 300w, https:\/\/courses.ideate.cmu.edu\/60-223\/f2022\/work\/wp-content\/uploads\/2022\/10\/Untitled-Diagram-3-1024x653.jpg 1024w, https:\/\/courses.ideate.cmu.edu\/60-223\/f2022\/work\/wp-content\/uploads\/2022\/10\/Untitled-Diagram-3-768x490.jpg 768w, https:\/\/courses.ideate.cmu.edu\/60-223\/f2022\/work\/wp-content\/uploads\/2022\/10\/Untitled-Diagram-3-973x620.jpg 973w, https:\/\/courses.ideate.cmu.edu\/60-223\/f2022\/work\/wp-content\/uploads\/2022\/10\/Untitled-Diagram-3-508x324.jpg 508w\" sizes=\"(max-width: 1242px) 100vw, 1242px\" \/><p id=\"caption-attachment-16628\" class=\"wp-caption-text\">Schematic (motor included)<\/p><\/div>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"c\">\/*\r\n  Title: Shoot! What time is it?\r\n  Creator: Sarah Yun\r\n  This is a code for an assistive device, which is an alarm clock using a RTC that requires the user to aim a nerf gun to a target attached to the clock to stop the alarm by shooting in between two IR sensors to break their connection.\r\n\r\n  Pin mapping:\r\n  Digital-\r\n  ~3 : servo motor\r\n  ~6 : Hour button\r\n  ~9 : Min button\r\n  ~10 : buzzer\r\n  13 : LED\r\n  Analog-\r\n  A0 : potentiometer\r\n  A4 : SDA (lcd, rtc)\r\n  A5 : SCL (lcd, rtc)\r\n\r\n  &gt;&gt;resources\/credit\r\n  1. Alarm_Clock by Tittiamo (Tiziano Bianchettin): https:\/\/create.arduino.cc\/projecthub\/tittiamo68\/alarm-clock-f61bad\r\n  2. IR Breakbeam Sensors: https:\/\/learn.adafruit.com\/ir-breakbeam-sensors\/arduino\r\n  3. RTC: https:\/\/create.arduino.cc\/projecthub\/MisterBotBreak\/how-to-use-a-real-time-clock-module-ds3231-bc90fe\r\n  4. potentiometer: https:\/\/docs.arduino.cc\/built-in-examples\/basics\/AnalogReadSerial\r\n  5. Zach's coding hint for boolean variable and reference to https:\/\/www.ict.ru.ac.za\/resources\/thinksharply\/thinksharply\/conditionals.html\r\n\r\n*\/\r\n\/\/------------------------------------------\r\n\/\/************libraries**************\/\/\r\n#include &lt;Wire.h&gt;\r\n#include &lt;RTClib.h&gt;\r\n#include &lt;LiquidCrystal_I2C.h&gt;\r\n\r\n\/\/************************************\/\/\r\nLiquidCrystal_I2C lcd(0x27, 20, 4); \/\/ Display  I2C 20 x 4\r\nRTC_DS1307 RTC;\r\n\r\n\/\/************Button*****************\/\/\r\nint P1 = 6; \/\/ Button SET MENU'\r\nint P2 = 9; \/\/ SWITCH Alarm\r\n\r\n\/\/**************Alarm***************\/\/\r\n#define SENSORPIN 4 \/\/IR\r\n#define buzzer 10 \/\/goes off\r\n#define LED 13 \/\/goes on\r\n#define pot A0 \/\/+ and -\r\n\r\n\/\/************Variables**************\/\/\r\nint hourupg;\r\nint minupg;\r\nint yearupg;\r\nint monthupg;\r\nint dayupg;\r\nint menu = 0;\r\nint setAll = 0;\r\nint sensorState = 0, lastState = 0;\r\nint timeH;\r\nint timeM;\r\nint potVal = 0;\r\nuint8_t alarmHours = 0, alarmMinutes = 0;\r\nbool alarmOn = false;\r\nfloat count = 0;\r\n\r\n\r\nvoid setup() {\r\n  lcd.init();\r\n  lcd.backlight();\r\n  lcd.clear();\r\n  pinMode(pot, INPUT);\r\n  pinMode(SENSORPIN, INPUT);\r\n  digitalWrite(SENSORPIN, HIGH);\r\n\r\n  pinMode(P1, INPUT_PULLUP);\r\n  pinMode(P2, INPUT_PULLUP);\r\n  pinMode(LED, OUTPUT);\r\n  pinMode(buzzer, OUTPUT);\r\n  printAllOff();\r\n  Serial.begin(9600);\r\n  Wire.begin();\r\n  RTC.begin();\r\n\r\n  \/\/****check if clock is working****\/\/\r\n  if (! RTC.isrunning()) {\r\n    Serial.println(\"RTC is NOT running!\");\r\n    RTC.adjust(DateTime(__DATE__, __TIME__)); \/\/ Set the date and time at compile time\r\n  }\r\n\r\n  RTC.adjust(DateTime(__DATE__, __TIME__)); \/\/resets time\r\n  int menu = 0;\r\n  count = 0;\r\n}\r\n\r\nvoid loop() {\r\n  sensorState = digitalRead(SENSORPIN);\r\n\r\n  if (digitalRead(P1) == LOW) {\r\n    menu = menu + 1;\r\n  }\r\n  if ((digitalRead(P1) == LOW) &amp;&amp; (digitalRead(P2) == LOW)) {\r\n    DisplaySetHourAll();\r\n    DisplaySetMinuteAll();\r\n    lcd.clear();\r\n    lcd.setCursor(5, 0);\r\n    lcd.print(\"ALARM\");\r\n    lcd.setCursor(5, 1);\r\n    lcd.print(alarmHours, DEC);\r\n    lcd.print(\":\");\r\n    lcd.print(alarmMinutes, DEC);\r\n    delay(1000);\r\n    lcd.clear();\r\n  }\r\n  if (menu == 0) {\r\n    DisplayDateTime();\r\n    checkTime();\r\n    Alarm();\r\n  }\r\n  if (menu == 1) {\r\n    StoreAgg();\r\n    delay(500);\r\n    menu = 0;\r\n  }\r\n  if (menu == 2) {\r\n    DisplayEnd();\r\n  }\r\n\r\n  delay(100);\r\n  lastState = sensorState;\r\n  Serial.println(count);\r\n}\r\n\r\n\/\/****current time****\/\/\r\nvoid DisplayDateTime () {\r\n  \/\/time\r\n  DateTime now = RTC.now();\r\n  lcd.setCursor(0, 2);\r\n  lcd.print(\"Time : \");\r\n  if (now.hour() &lt;= 9) {\r\n    lcd.print(\"0\");\r\n  }\r\n  lcd.print(now.hour(), DEC);\r\n  hourupg = now.hour();\r\n  lcd.print(\":\");\r\n  if (now.minute() &lt;= 9) {\r\n    lcd.print(\"0\");\r\n  }\r\n  lcd.print(now.minute(), DEC);\r\n  minupg = now.minute();\r\n  lcd.print(\":\");\r\n  if (now.second() &lt;= 9) {\r\n    lcd.print(\"0\");\r\n  }\r\n  lcd.print(now.second(), DEC);\r\n\r\n  \/\/date\r\n  lcd.setCursor(0, 1);\r\n  lcd.print(\"Date : \");\r\n  if (now.month() &lt;= 9) {\r\n    lcd.print(\"0\");\r\n  }\r\n  lcd.print(now.month(), DEC);\r\n  monthupg = now.month();\r\n  lcd.print(\"\/\");\r\n  if (now.day() &lt;= 9)\r\n  {\r\n    lcd.print(\"0\");\r\n  }\r\n  lcd.print(now.day(), DEC);\r\n  dayupg = now.day();\r\n  lcd.print(\"\/\");\r\n  lcd.print(now.year(), DEC);\r\n  yearupg = now.year();\r\n\r\n  \/\/day\r\n  char DOW[][10] = {\"Sunday   \", \"Monday   \", \"Tuesday  \", \"Wednesday\", \"Thursday \", \"Friday   \", \"Saturday \"};\r\n  lcd.setCursor(0, 0);\r\n  lcd.print(\"Day  : \");\r\n  lcd.print(DOW[now.dayOfTheWeek()]);\r\n}\r\n\r\n\/\/****Variable saving****\/\/\r\nvoid StoreAgg() {\r\n  lcd.clear();\r\n  lcd.setCursor(0, 0);\r\n  lcd.print(\"SAVING IN\");\r\n  lcd.setCursor(0, 1);\r\n  lcd.print(\"PROGRESS\");\r\n  RTC.adjust(DateTime(yearupg, monthupg, dayupg, hourupg, minupg, 0));\r\n  delay(200);\r\n}\r\n\r\n\/\/ Setting the alarm minutes\r\nvoid DisplaySetHourAll() {\r\n  while (digitalRead(P1) == LOW) {\r\n    Serial.println(\"Displayset Hour is happening!\");\r\n    lcd.clear();\r\n    potVal = analogRead(pot);\r\n    timeH = map(potVal, 0, 1023, 0, 24);\r\n    alarmHours = timeH;\r\n\r\n    lcd.setCursor(0, 0);\r\n    lcd.print(\"Set HOUR Alarm:\");\r\n    lcd.setCursor(0, 1);\r\n    lcd.print(alarmHours, DEC);\r\n    delay(200);\r\n  }\r\n  delay(200);\r\n}\r\n\r\nvoid DisplaySetMinuteAll() {\r\n  while (digitalRead(P2) == LOW) {\r\n    lcd.clear();\r\n    potVal = analogRead(pot);\r\n    timeM = map(potVal, 0, 1023, 0, 60);\r\n    alarmMinutes = timeM;\r\n\r\n    lcd.setCursor(0, 0);\r\n    lcd.print(\"Set MIN. Alarm:\");\r\n    lcd.setCursor(0, 1);\r\n    lcd.print(alarmMinutes, DEC);\r\n    delay(200);\r\n  }\r\n  delay(200);\r\n}\r\n\r\nvoid DisplayEnd() {\r\n  lcd.clear();\r\n  lcd.setCursor(1, 1);\r\n  lcd.print(\"'HEY, YOU UP NOW?'\");\r\n  \/\/  lcd.setCursor(9, 2);\r\n  \/\/  lcd.print(\"_ .\");\r\n  lcd.setCursor(7, 2);\r\n  lcd.print(\"|'w')?\");\r\n  delay(200);\r\n}\r\n\r\n\/\/****Alarm On****\/\/\r\nvoid printAllOn() {\r\n  Serial.println(\"print all on on\");\r\n  lcd.setCursor(0, 3);\r\n  lcd.print(\"Alarm: \");\r\n  if (alarmHours &lt;= 9) {\r\n    lcd.print(\"0\");\r\n  }\r\n  lcd.print(alarmHours, DEC);\r\n  lcd.print(\":\");\r\n  if (alarmMinutes &lt;= 9) {\r\n    lcd.print(\"0\");\r\n  }\r\n  lcd.print(alarmMinutes, DEC);\r\n}\r\n\r\n\/\/****Alarm Off****\/\/\r\nvoid printAllOff() {\r\n  lcd.setCursor(0, 3);\r\n  lcd.print(\"Alarm: Off  \");\r\n}\r\n\r\nvoid checkTime() {\r\n  printAllOn();\r\n  DateTime now = RTC.now();\r\n  if ((!sensorState &amp;&amp; lastState))  {\r\n    Serial.println(\"broken\");\r\n    alarmOn = false;\r\n    count += 0.25;\r\n  }\r\n  else if (now.hour() == alarmHours &amp;&amp; now.minute() == alarmMinutes &amp;&amp;  (count &lt; 0.25)) {\r\n    alarmOn = true;\r\n  }\r\n  if (digitalRead(P2) == LOW) {\r\n    count = 0;\r\n  }\r\n\r\n\r\n}\r\n\r\nvoid Alarm() {\r\n  if (alarmOn == true) {\r\n    lcd.noBacklight();\r\n    DateTime now = RTC.now();\r\n    digitalWrite(LED, HIGH);\r\n    tone(buzzer, 880); \/\/play the note \"A5\" (LA5)\r\n    delay (300);\r\n    tone(buzzer, 698); \/\/play the note \"F6\" (FA5)\r\n    lcd.backlight();\r\n  }\r\n  else if (alarmOn == false) {\r\n    noTone (buzzer);\r\n    digitalWrite(LED, LOW);\r\n  }\r\n\r\n}<\/pre>\n","protected":false},"excerpt":{"rendered":"<p>My assistive device is an alarm clock that requires the user to aim a nerf gun to a target attached to the clock to stop the alarm. &nbsp;&#8230;<\/p>\n","protected":false},"author":231,"featured_media":16509,"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\/f2022\/work\/wp-json\/wp\/v2\/posts\/16426"}],"collection":[{"href":"https:\/\/courses.ideate.cmu.edu\/60-223\/f2022\/work\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/courses.ideate.cmu.edu\/60-223\/f2022\/work\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/courses.ideate.cmu.edu\/60-223\/f2022\/work\/wp-json\/wp\/v2\/users\/231"}],"replies":[{"embeddable":true,"href":"https:\/\/courses.ideate.cmu.edu\/60-223\/f2022\/work\/wp-json\/wp\/v2\/comments?post=16426"}],"version-history":[{"count":15,"href":"https:\/\/courses.ideate.cmu.edu\/60-223\/f2022\/work\/wp-json\/wp\/v2\/posts\/16426\/revisions"}],"predecessor-version":[{"id":16646,"href":"https:\/\/courses.ideate.cmu.edu\/60-223\/f2022\/work\/wp-json\/wp\/v2\/posts\/16426\/revisions\/16646"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/courses.ideate.cmu.edu\/60-223\/f2022\/work\/wp-json\/wp\/v2\/media\/16509"}],"wp:attachment":[{"href":"https:\/\/courses.ideate.cmu.edu\/60-223\/f2022\/work\/wp-json\/wp\/v2\/media?parent=16426"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/courses.ideate.cmu.edu\/60-223\/f2022\/work\/wp-json\/wp\/v2\/categories?post=16426"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/courses.ideate.cmu.edu\/60-223\/f2022\/work\/wp-json\/wp\/v2\/tags?post=16426"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}