{"id":14333,"date":"2021-11-02T01:02:05","date_gmt":"2021-11-02T05:02:05","guid":{"rendered":"https:\/\/courses.ideate.cmu.edu\/60-223\/f2021\/work\/?p=14333"},"modified":"2021-11-02T01:11:01","modified_gmt":"2021-11-02T05:11:01","slug":"nice-things-alarm","status":"publish","type":"post","link":"https:\/\/courses.ideate.cmu.edu\/60-223\/f2021\/work\/nice-things-alarm\/","title":{"rendered":"Nice Things Alarm"},"content":{"rendered":"<h2 id=\"overview\">Overview<\/h2>\n<p>An accessory to an alarm clock which prints out nice quotes in response to sensing the sound of an alarm.<\/p>\n<p><em>A more in-depth video of the full functionality, including responsiveness to sound:<\/em><\/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-14333-1\" width=\"620\" height=\"349\" preload=\"metadata\" controls=\"controls\"><source type=\"video\/mp4\" src=\"https:\/\/courses.ideate.cmu.edu\/60-223\/f2021\/work\/wp-content\/uploads\/2021\/11\/PXL_20211026_032706282.mp4?_=1\" \/><a href=\"https:\/\/courses.ideate.cmu.edu\/60-223\/f2021\/work\/wp-content\/uploads\/2021\/11\/PXL_20211026_032706282.mp4\">https:\/\/courses.ideate.cmu.edu\/60-223\/f2021\/work\/wp-content\/uploads\/2021\/11\/PXL_20211026_032706282.mp4<\/a><\/video><\/div>\n<p>&nbsp;<\/p>\n<p><em>A video of the final project:<\/em><\/p>\n<div style=\"width: 620px;\" class=\"wp-video\"><video class=\"wp-video-shortcode\" id=\"video-14333-2\" width=\"620\" height=\"349\" preload=\"metadata\" controls=\"controls\"><source type=\"video\/mp4\" src=\"https:\/\/courses.ideate.cmu.edu\/60-223\/f2021\/work\/wp-content\/uploads\/2021\/11\/PXL_20211101_221746560.mp4?_=2\" \/><a href=\"https:\/\/courses.ideate.cmu.edu\/60-223\/f2021\/work\/wp-content\/uploads\/2021\/11\/PXL_20211101_221746560.mp4\">https:\/\/courses.ideate.cmu.edu\/60-223\/f2021\/work\/wp-content\/uploads\/2021\/11\/PXL_20211101_221746560.mp4<\/a><\/video><\/div>\n<p>&nbsp;<\/p>\n<div id=\"attachment_14344\" style=\"width: 2058px\" class=\"wp-caption alignnone\"><img aria-describedby=\"caption-attachment-14344\" loading=\"lazy\" class=\"size-full wp-image-14344\" src=\"https:\/\/courses.ideate.cmu.edu\/60-223\/f2021\/work\/wp-content\/uploads\/2021\/11\/DSC_0024.jpg\" alt=\"\" width=\"2048\" height=\"1366\" srcset=\"https:\/\/courses.ideate.cmu.edu\/60-223\/f2021\/work\/wp-content\/uploads\/2021\/11\/DSC_0024.jpg 2048w, https:\/\/courses.ideate.cmu.edu\/60-223\/f2021\/work\/wp-content\/uploads\/2021\/11\/DSC_0024-300x200.jpg 300w, https:\/\/courses.ideate.cmu.edu\/60-223\/f2021\/work\/wp-content\/uploads\/2021\/11\/DSC_0024-1024x683.jpg 1024w, https:\/\/courses.ideate.cmu.edu\/60-223\/f2021\/work\/wp-content\/uploads\/2021\/11\/DSC_0024-768x512.jpg 768w, https:\/\/courses.ideate.cmu.edu\/60-223\/f2021\/work\/wp-content\/uploads\/2021\/11\/DSC_0024-1536x1025.jpg 1536w, https:\/\/courses.ideate.cmu.edu\/60-223\/f2021\/work\/wp-content\/uploads\/2021\/11\/DSC_0024-973x649.jpg 973w, https:\/\/courses.ideate.cmu.edu\/60-223\/f2021\/work\/wp-content\/uploads\/2021\/11\/DSC_0024-508x339.jpg 508w\" sizes=\"(max-width: 2048px) 100vw, 2048px\" \/><p id=\"caption-attachment-14344\" class=\"wp-caption-text\">Featured image of the overall project.<\/p><\/div>\n<p>&nbsp;<\/p>\n<div id=\"attachment_14345\" style=\"width: 2058px\" class=\"wp-caption alignnone\"><img aria-describedby=\"caption-attachment-14345\" loading=\"lazy\" class=\"size-full wp-image-14345\" src=\"https:\/\/courses.ideate.cmu.edu\/60-223\/f2021\/work\/wp-content\/uploads\/2021\/11\/DSC_0027.jpg\" alt=\"\" width=\"2048\" height=\"1366\" srcset=\"https:\/\/courses.ideate.cmu.edu\/60-223\/f2021\/work\/wp-content\/uploads\/2021\/11\/DSC_0027.jpg 2048w, https:\/\/courses.ideate.cmu.edu\/60-223\/f2021\/work\/wp-content\/uploads\/2021\/11\/DSC_0027-300x200.jpg 300w, https:\/\/courses.ideate.cmu.edu\/60-223\/f2021\/work\/wp-content\/uploads\/2021\/11\/DSC_0027-1024x683.jpg 1024w, https:\/\/courses.ideate.cmu.edu\/60-223\/f2021\/work\/wp-content\/uploads\/2021\/11\/DSC_0027-768x512.jpg 768w, https:\/\/courses.ideate.cmu.edu\/60-223\/f2021\/work\/wp-content\/uploads\/2021\/11\/DSC_0027-1536x1025.jpg 1536w, https:\/\/courses.ideate.cmu.edu\/60-223\/f2021\/work\/wp-content\/uploads\/2021\/11\/DSC_0027-973x649.jpg 973w, https:\/\/courses.ideate.cmu.edu\/60-223\/f2021\/work\/wp-content\/uploads\/2021\/11\/DSC_0027-508x339.jpg 508w\" sizes=\"(max-width: 2048px) 100vw, 2048px\" \/><p id=\"caption-attachment-14345\" class=\"wp-caption-text\">Detail shot 1: Thermal printer which uses heat (as one might expect) to print text onto a roll of receipt paper.<\/p><\/div>\n<p>&nbsp;<\/p>\n<div id=\"attachment_14346\" style=\"width: 2058px\" class=\"wp-caption alignnone\"><img aria-describedby=\"caption-attachment-14346\" loading=\"lazy\" class=\"size-full wp-image-14346\" src=\"https:\/\/courses.ideate.cmu.edu\/60-223\/f2021\/work\/wp-content\/uploads\/2021\/11\/DSC_0030-1.jpg\" alt=\"\" width=\"2048\" height=\"1366\" srcset=\"https:\/\/courses.ideate.cmu.edu\/60-223\/f2021\/work\/wp-content\/uploads\/2021\/11\/DSC_0030-1.jpg 2048w, https:\/\/courses.ideate.cmu.edu\/60-223\/f2021\/work\/wp-content\/uploads\/2021\/11\/DSC_0030-1-300x200.jpg 300w, https:\/\/courses.ideate.cmu.edu\/60-223\/f2021\/work\/wp-content\/uploads\/2021\/11\/DSC_0030-1-1024x683.jpg 1024w, https:\/\/courses.ideate.cmu.edu\/60-223\/f2021\/work\/wp-content\/uploads\/2021\/11\/DSC_0030-1-768x512.jpg 768w, https:\/\/courses.ideate.cmu.edu\/60-223\/f2021\/work\/wp-content\/uploads\/2021\/11\/DSC_0030-1-1536x1025.jpg 1536w, https:\/\/courses.ideate.cmu.edu\/60-223\/f2021\/work\/wp-content\/uploads\/2021\/11\/DSC_0030-1-973x649.jpg 973w, https:\/\/courses.ideate.cmu.edu\/60-223\/f2021\/work\/wp-content\/uploads\/2021\/11\/DSC_0030-1-508x339.jpg 508w\" sizes=\"(max-width: 2048px) 100vw, 2048px\" \/><p id=\"caption-attachment-14346\" class=\"wp-caption-text\">Detail shot 2: SD card for storing large sets of data (text, in this case).<\/p><\/div>\n<p>&nbsp;<\/p>\n<div id=\"attachment_14347\" style=\"width: 2058px\" class=\"wp-caption alignnone\"><img aria-describedby=\"caption-attachment-14347\" loading=\"lazy\" class=\"size-full wp-image-14347\" src=\"https:\/\/courses.ideate.cmu.edu\/60-223\/f2021\/work\/wp-content\/uploads\/2021\/11\/DSC_0032.jpg\" alt=\"\" width=\"2048\" height=\"1366\" srcset=\"https:\/\/courses.ideate.cmu.edu\/60-223\/f2021\/work\/wp-content\/uploads\/2021\/11\/DSC_0032.jpg 2048w, https:\/\/courses.ideate.cmu.edu\/60-223\/f2021\/work\/wp-content\/uploads\/2021\/11\/DSC_0032-300x200.jpg 300w, https:\/\/courses.ideate.cmu.edu\/60-223\/f2021\/work\/wp-content\/uploads\/2021\/11\/DSC_0032-1024x683.jpg 1024w, https:\/\/courses.ideate.cmu.edu\/60-223\/f2021\/work\/wp-content\/uploads\/2021\/11\/DSC_0032-768x512.jpg 768w, https:\/\/courses.ideate.cmu.edu\/60-223\/f2021\/work\/wp-content\/uploads\/2021\/11\/DSC_0032-1536x1025.jpg 1536w, https:\/\/courses.ideate.cmu.edu\/60-223\/f2021\/work\/wp-content\/uploads\/2021\/11\/DSC_0032-973x649.jpg 973w, https:\/\/courses.ideate.cmu.edu\/60-223\/f2021\/work\/wp-content\/uploads\/2021\/11\/DSC_0032-508x339.jpg 508w\" sizes=\"(max-width: 2048px) 100vw, 2048px\" \/><p id=\"caption-attachment-14347\" class=\"wp-caption-text\">Detail shot 3: Microphone to sense input sound.<\/p><\/div>\n<p>&nbsp;<\/p>\n<div id=\"attachment_14350\" style=\"width: 2058px\" class=\"wp-caption alignnone\"><img aria-describedby=\"caption-attachment-14350\" loading=\"lazy\" class=\"size-full wp-image-14350\" src=\"https:\/\/courses.ideate.cmu.edu\/60-223\/f2021\/work\/wp-content\/uploads\/2021\/11\/DSC_0018-1.jpg\" alt=\"\" width=\"2048\" height=\"1366\" srcset=\"https:\/\/courses.ideate.cmu.edu\/60-223\/f2021\/work\/wp-content\/uploads\/2021\/11\/DSC_0018-1.jpg 2048w, https:\/\/courses.ideate.cmu.edu\/60-223\/f2021\/work\/wp-content\/uploads\/2021\/11\/DSC_0018-1-300x200.jpg 300w, https:\/\/courses.ideate.cmu.edu\/60-223\/f2021\/work\/wp-content\/uploads\/2021\/11\/DSC_0018-1-1024x683.jpg 1024w, https:\/\/courses.ideate.cmu.edu\/60-223\/f2021\/work\/wp-content\/uploads\/2021\/11\/DSC_0018-1-768x512.jpg 768w, https:\/\/courses.ideate.cmu.edu\/60-223\/f2021\/work\/wp-content\/uploads\/2021\/11\/DSC_0018-1-1536x1025.jpg 1536w, https:\/\/courses.ideate.cmu.edu\/60-223\/f2021\/work\/wp-content\/uploads\/2021\/11\/DSC_0018-1-973x649.jpg 973w, https:\/\/courses.ideate.cmu.edu\/60-223\/f2021\/work\/wp-content\/uploads\/2021\/11\/DSC_0018-1-508x339.jpg 508w\" sizes=\"(max-width: 2048px) 100vw, 2048px\" \/><p id=\"caption-attachment-14350\" class=\"wp-caption-text\">Usage shot 1: Alarm clock sits comfortably beside the box; with clock speakers next to the microphone.<\/p><\/div>\n<p>&nbsp;<\/p>\n<div id=\"attachment_14351\" style=\"width: 2058px\" class=\"wp-caption alignnone\"><img aria-describedby=\"caption-attachment-14351\" loading=\"lazy\" class=\"size-full wp-image-14351\" src=\"https:\/\/courses.ideate.cmu.edu\/60-223\/f2021\/work\/wp-content\/uploads\/2021\/11\/DSC_0020.jpg\" alt=\"\" width=\"2048\" height=\"1366\" srcset=\"https:\/\/courses.ideate.cmu.edu\/60-223\/f2021\/work\/wp-content\/uploads\/2021\/11\/DSC_0020.jpg 2048w, https:\/\/courses.ideate.cmu.edu\/60-223\/f2021\/work\/wp-content\/uploads\/2021\/11\/DSC_0020-300x200.jpg 300w, https:\/\/courses.ideate.cmu.edu\/60-223\/f2021\/work\/wp-content\/uploads\/2021\/11\/DSC_0020-1024x683.jpg 1024w, https:\/\/courses.ideate.cmu.edu\/60-223\/f2021\/work\/wp-content\/uploads\/2021\/11\/DSC_0020-768x512.jpg 768w, https:\/\/courses.ideate.cmu.edu\/60-223\/f2021\/work\/wp-content\/uploads\/2021\/11\/DSC_0020-1536x1025.jpg 1536w, https:\/\/courses.ideate.cmu.edu\/60-223\/f2021\/work\/wp-content\/uploads\/2021\/11\/DSC_0020-973x649.jpg 973w, https:\/\/courses.ideate.cmu.edu\/60-223\/f2021\/work\/wp-content\/uploads\/2021\/11\/DSC_0020-508x339.jpg 508w\" sizes=\"(max-width: 2048px) 100vw, 2048px\" \/><p id=\"caption-attachment-14351\" class=\"wp-caption-text\">Usage shot 2: Speaker against the clock.<\/p><\/div>\n<h2 id=\"process-images-and-review\">Process images and review<\/h2>\n<p>One pivot point was deciding how to import a large-ish amount of data into the Arduino. Rather than storing all the string data on the Arduino&#8217;s tiny brain, I split my <a href=\"https:\/\/docs.google.com\/document\/d\/1o1D3Ag1jMS7YIv2cs92ebowTBgHf0K4IKqzP39WNmes\/edit\"><strong>Google doc full of quotes<\/strong><\/a> (perpetually accumulating) into many little .txt files with a Python script.<\/p>\n<div id=\"attachment_14358\" style=\"width: 970px\" class=\"wp-caption alignnone\"><img aria-describedby=\"caption-attachment-14358\" loading=\"lazy\" class=\"size-full wp-image-14358\" src=\"https:\/\/courses.ideate.cmu.edu\/60-223\/f2021\/work\/wp-content\/uploads\/2021\/11\/proj2-almost-done.png\" alt=\"\" width=\"960\" height=\"540\" srcset=\"https:\/\/courses.ideate.cmu.edu\/60-223\/f2021\/work\/wp-content\/uploads\/2021\/11\/proj2-almost-done.png 960w, https:\/\/courses.ideate.cmu.edu\/60-223\/f2021\/work\/wp-content\/uploads\/2021\/11\/proj2-almost-done-300x169.png 300w, https:\/\/courses.ideate.cmu.edu\/60-223\/f2021\/work\/wp-content\/uploads\/2021\/11\/proj2-almost-done-768x432.png 768w, https:\/\/courses.ideate.cmu.edu\/60-223\/f2021\/work\/wp-content\/uploads\/2021\/11\/proj2-almost-done-508x286.png 508w\" sizes=\"(max-width: 960px) 100vw, 960px\" \/><p id=\"caption-attachment-14358\" class=\"wp-caption-text\">Decision point 1: Quotes and a quote splitter.<\/p><\/div>\n<p>Another pivot point was when I realized my dxf for the wooden box didn&#8217;t have a kern that allowed press-fitting. I considered recutting and perhaps modulating the design of the final product, but owing to the time constraints, I ended up rapidly locating wood glue and gluing my box together, hoping it would cure overnight (and it mostly did!)<\/p>\n<div id=\"attachment_14356\" style=\"width: 1546px\" class=\"wp-caption alignnone\"><img aria-describedby=\"caption-attachment-14356\" loading=\"lazy\" class=\"size-full wp-image-14356\" src=\"https:\/\/courses.ideate.cmu.edu\/60-223\/f2021\/work\/wp-content\/uploads\/2021\/11\/PXL_20211027_215016351.jpg\" alt=\"\" width=\"1536\" height=\"2048\" srcset=\"https:\/\/courses.ideate.cmu.edu\/60-223\/f2021\/work\/wp-content\/uploads\/2021\/11\/PXL_20211027_215016351.jpg 1536w, https:\/\/courses.ideate.cmu.edu\/60-223\/f2021\/work\/wp-content\/uploads\/2021\/11\/PXL_20211027_215016351-225x300.jpg 225w, https:\/\/courses.ideate.cmu.edu\/60-223\/f2021\/work\/wp-content\/uploads\/2021\/11\/PXL_20211027_215016351-768x1024.jpg 768w, https:\/\/courses.ideate.cmu.edu\/60-223\/f2021\/work\/wp-content\/uploads\/2021\/11\/PXL_20211027_215016351-1152x1536.jpg 1152w, https:\/\/courses.ideate.cmu.edu\/60-223\/f2021\/work\/wp-content\/uploads\/2021\/11\/PXL_20211027_215016351-973x1297.jpg 973w, https:\/\/courses.ideate.cmu.edu\/60-223\/f2021\/work\/wp-content\/uploads\/2021\/11\/PXL_20211027_215016351-508x677.jpg 508w\" sizes=\"(max-width: 1536px) 100vw, 1536px\" \/><p id=\"caption-attachment-14356\" class=\"wp-caption-text\">Decision point 2: Having to construct a box with wood glue.<\/p><\/div>\n<p>Additionally, here are a few more pictures of the process:<\/p>\n<div id=\"attachment_14359\" style=\"width: 1930px\" class=\"wp-caption alignnone\"><img aria-describedby=\"caption-attachment-14359\" loading=\"lazy\" class=\"size-full wp-image-14359\" src=\"https:\/\/courses.ideate.cmu.edu\/60-223\/f2021\/work\/wp-content\/uploads\/2021\/11\/PXL_20211021_145207595-scaled.jpg\" alt=\"\" width=\"1920\" height=\"2560\" srcset=\"https:\/\/courses.ideate.cmu.edu\/60-223\/f2021\/work\/wp-content\/uploads\/2021\/11\/PXL_20211021_145207595-scaled.jpg 1920w, https:\/\/courses.ideate.cmu.edu\/60-223\/f2021\/work\/wp-content\/uploads\/2021\/11\/PXL_20211021_145207595-225x300.jpg 225w, https:\/\/courses.ideate.cmu.edu\/60-223\/f2021\/work\/wp-content\/uploads\/2021\/11\/PXL_20211021_145207595-768x1024.jpg 768w, https:\/\/courses.ideate.cmu.edu\/60-223\/f2021\/work\/wp-content\/uploads\/2021\/11\/PXL_20211021_145207595-1152x1536.jpg 1152w, https:\/\/courses.ideate.cmu.edu\/60-223\/f2021\/work\/wp-content\/uploads\/2021\/11\/PXL_20211021_145207595-1536x2048.jpg 1536w, https:\/\/courses.ideate.cmu.edu\/60-223\/f2021\/work\/wp-content\/uploads\/2021\/11\/PXL_20211021_145207595-973x1297.jpg 973w, https:\/\/courses.ideate.cmu.edu\/60-223\/f2021\/work\/wp-content\/uploads\/2021\/11\/PXL_20211021_145207595-508x677.jpg 508w\" sizes=\"(max-width: 1920px) 100vw, 1920px\" \/><p id=\"caption-attachment-14359\" class=\"wp-caption-text\">The first successful run of the printer!<\/p><\/div>\n<p>&nbsp;<\/p>\n<div id=\"attachment_14360\" style=\"width: 1546px\" class=\"wp-caption alignnone\"><img aria-describedby=\"caption-attachment-14360\" loading=\"lazy\" class=\"size-full wp-image-14360\" src=\"https:\/\/courses.ideate.cmu.edu\/60-223\/f2021\/work\/wp-content\/uploads\/2021\/11\/PXL_20211024_175529560.jpg\" alt=\"\" width=\"1536\" height=\"2048\" srcset=\"https:\/\/courses.ideate.cmu.edu\/60-223\/f2021\/work\/wp-content\/uploads\/2021\/11\/PXL_20211024_175529560.jpg 1536w, https:\/\/courses.ideate.cmu.edu\/60-223\/f2021\/work\/wp-content\/uploads\/2021\/11\/PXL_20211024_175529560-225x300.jpg 225w, https:\/\/courses.ideate.cmu.edu\/60-223\/f2021\/work\/wp-content\/uploads\/2021\/11\/PXL_20211024_175529560-768x1024.jpg 768w, https:\/\/courses.ideate.cmu.edu\/60-223\/f2021\/work\/wp-content\/uploads\/2021\/11\/PXL_20211024_175529560-1152x1536.jpg 1152w, https:\/\/courses.ideate.cmu.edu\/60-223\/f2021\/work\/wp-content\/uploads\/2021\/11\/PXL_20211024_175529560-973x1297.jpg 973w, https:\/\/courses.ideate.cmu.edu\/60-223\/f2021\/work\/wp-content\/uploads\/2021\/11\/PXL_20211024_175529560-508x677.jpg 508w\" sizes=\"(max-width: 1536px) 100vw, 1536px\" \/><p id=\"caption-attachment-14360\" class=\"wp-caption-text\">&#8230;and a buggy run of the printer when trying to sort out multiple serial ports. It&#8217;s modern art?<\/p><\/div>\n<p>&nbsp;<\/p>\n<div id=\"attachment_14361\" style=\"width: 630px\" class=\"wp-caption alignnone\"><a href=\"https:\/\/courses.ideate.cmu.edu\/60-223\/f2021\/work\/wp-content\/uploads\/2021\/11\/Pc-box.svg\"><img aria-describedby=\"caption-attachment-14361\" loading=\"lazy\" class=\"wp-image-14361 size-large\" src=\"https:\/\/courses.ideate.cmu.edu\/60-223\/f2021\/work\/wp-content\/uploads\/2021\/11\/Pc-box.svg\" alt=\"\" width=\"620\" height=\"620\" srcset=\"https:\/\/courses.ideate.cmu.edu\/60-223\/f2021\/work\/wp-content\/uploads\/\/2021\/11\/Pc-box.svg 150w, https:\/\/courses.ideate.cmu.edu\/60-223\/f2021\/work\/wp-content\/uploads\/\/2021\/11\/Pc-box.svg 300w, https:\/\/courses.ideate.cmu.edu\/60-223\/f2021\/work\/wp-content\/uploads\/\/2021\/11\/Pc-box.svg 1024w, https:\/\/courses.ideate.cmu.edu\/60-223\/f2021\/work\/wp-content\/uploads\/\/2021\/11\/Pc-box.svg 100w\" sizes=\"(max-width: 620px) 100vw, 620px\" \/><\/a><p id=\"caption-attachment-14361\" class=\"wp-caption-text\">The SVG for the graphics on top of the box that I then laser cut!<\/p><\/div>\n<h2 id=\"discussion\">Discussion<\/h2>\n<p>&#8220;I wonder if there is a place that already has a \u201chub\u201d of positive messages that you could source from, that way it could be more of a surprise for you?&#8221;<\/p>\n<p>I really like the idea of the messages being pleasant surprises. However, I feel like the large hubs of positive quotes that I might find online would be those really cheesy, <em>hashtag-inspirational<\/em> ones that are nice but somewhat grating and simplistic. This does spawn another idea, though. I have most of my conversations with my partner over Discord (&#8230;haha) and Discord has a really solid and in-depth data request system, so I think I could do some text parsing to create little snippets from nice past conversations that I could randomly output every morning. That would fulfill all the personal, warm, and random categories.<\/p>\n<p>&#8220;The printing format is super flexible and lets you print everything from jokes and riddles to memories and reminders.&#8221;<\/p>\n<p>I like it too\u2014I think if I were to continue developing this work, a large part would be increasing the diversity of the text repository. Another critiquer mentioned the receipts as a way to get news or weather so that he might check his phone less in the mornings, and I also like that intention.<\/p>\n<p>Overall, I am moderately happy with how the project came out. I got burnt-out\/sick during the middle of it, losing some momentum, and also realized that I would have to purchase ~$100 worth of materials (plus replenishing the receipt paper regularly) in order to keep using the project, which kind of deterred me from being as invested in the final product. I think the final product&#8217;s physical fabrication is a little shaky, and I would like to get better at this aspect of physical computing. However, I like the artistic implications of the project and the organic touches that I added to it. The process of crowdsourcing poetry and chopping it up into little bits was therapeutic, especially knowing that I would have something that I could hold in my hands at the end of it. <em>Really though, my favorite parts of this project involved community<\/em>, i.e., learning people&#8217;s favorite poems or handing out the &#8220;test cases&#8221; and seeing people&#8217;s faces light up with joy.<\/p>\n<p>I found some limitations in knowledge when I spent an embarrassing amount of time in the laser room trying to piece my box together around my project. I would like to get better at CAD so I can create nicer, organic forms. I also hit some roadblocks with maintaining two separate serial communication lines (with the SoftwareSerial library, which turns any pair of digital pins into data RX\/TX lines)\u2014one for debugging, and another for the thermal printer. And I had a weirdly hard time trying to figure out how to convert ints to strings because it&#8217;s different for C, normal C++, and Arduino C++?<\/p>\n<p>I am not sure if I want to invest in another, long-term version of this project, but if I were to, there are a few things I would do differently. I&#8217;d probably make the speaker a little more sturdy\u2014perhaps panel mounted with a hood above it so it stays in place nicely and outside sound doesn&#8217;t interfere as much. I&#8217;d probably manipulate the strings a little better so words don&#8217;t break in the middle (the printer seems to simply split strings into new lines wherever the receipt isn&#8217;t wide enough). I&#8217;d also position the printer a bit more nicely, so the receipt paper is closer to the top of the box and feeding and tearing it out is easier.<\/p>\n<h2 id=\"technical-information\">Technical information<\/h2>\n<p>&nbsp;<\/p>\n<div id=\"attachment_14382\" style=\"width: 867px\" class=\"wp-caption alignnone\"><img aria-describedby=\"caption-attachment-14382\" loading=\"lazy\" class=\"size-full wp-image-14382\" src=\"https:\/\/courses.ideate.cmu.edu\/60-223\/f2021\/work\/wp-content\/uploads\/2021\/11\/Untitled-Diagram-1.jpg\" alt=\"\" width=\"857\" height=\"282\" srcset=\"https:\/\/courses.ideate.cmu.edu\/60-223\/f2021\/work\/wp-content\/uploads\/2021\/11\/Untitled-Diagram-1.jpg 857w, https:\/\/courses.ideate.cmu.edu\/60-223\/f2021\/work\/wp-content\/uploads\/2021\/11\/Untitled-Diagram-1-300x99.jpg 300w, https:\/\/courses.ideate.cmu.edu\/60-223\/f2021\/work\/wp-content\/uploads\/2021\/11\/Untitled-Diagram-1-768x253.jpg 768w, https:\/\/courses.ideate.cmu.edu\/60-223\/f2021\/work\/wp-content\/uploads\/2021\/11\/Untitled-Diagram-1-508x167.jpg 508w\" sizes=\"(max-width: 857px) 100vw, 857px\" \/><p id=\"caption-attachment-14382\" class=\"wp-caption-text\">Block diagram<\/p><\/div>\n<div id=\"attachment_14383\" style=\"width: 734px\" class=\"wp-caption alignnone\"><img aria-describedby=\"caption-attachment-14383\" loading=\"lazy\" class=\"size-full wp-image-14383\" src=\"https:\/\/courses.ideate.cmu.edu\/60-223\/f2021\/work\/wp-content\/uploads\/2021\/11\/Untitled-Diagram-2.jpg\" alt=\"\" width=\"724\" height=\"942\" srcset=\"https:\/\/courses.ideate.cmu.edu\/60-223\/f2021\/work\/wp-content\/uploads\/2021\/11\/Untitled-Diagram-2.jpg 724w, https:\/\/courses.ideate.cmu.edu\/60-223\/f2021\/work\/wp-content\/uploads\/2021\/11\/Untitled-Diagram-2-231x300.jpg 231w, https:\/\/courses.ideate.cmu.edu\/60-223\/f2021\/work\/wp-content\/uploads\/2021\/11\/Untitled-Diagram-2-508x661.jpg 508w\" sizes=\"(max-width: 724px) 100vw, 724px\" \/><p id=\"caption-attachment-14383\" class=\"wp-caption-text\">Schematic<\/p><\/div>\n<p><em>Code:<\/em><\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"c\">\/*------------------------------------------------------------------------\r\nCopyright 2021 Shenai Chan\r\n\r\nPermission is hereby granted, free of charge, to any person obtaining a \r\ncopy of this software and associated documentation files (the \"Software\"),\r\nto deal in the Software without restriction, including without limitation \r\nthe rights to use, copy, modify, merge, publish, distribute, sublicense, \r\nand\/or sell copies of the Software, and to permit persons to whom the \r\nSoftware is furnished to do so, subject to the following conditions:\r\n\r\nThe above copyright notice and this permission notice shall be included \r\nin all copies or substantial portions of the Software.\r\n\r\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS \r\nOR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, \r\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE \r\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER \r\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING \r\nFROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS \r\nIN THE SOFTWARE.\r\n--------------------------------------------------------------------------*\/\r\n\r\n\/*------------------------------------------------------------------------\r\nDescription:\r\nData is read into the Arduino by way of a micro SD card reader and printed\r\nonto a receipt with a thermal printer when the appropriate threshold of \r\nsound is reached (as detected by sound detector).\r\n--------------------------------------------------------------------------*\/\r\n\r\n\/*------------------------------------------------------------------------\r\nConnections:\r\nPrinter RX              &lt;--&gt;  6 Output\r\nPrinter TX              &lt;--&gt;  5 Input\r\nSD MOSI                 &lt;--&gt; 11 Input\r\nSD MISO                 &lt;--&gt; 12 Input\r\nSD CLK                  &lt;--&gt; 13 Input\r\nSD CS                   &lt;--&gt;  4 Input\r\nSound Detector Gate     &lt;--&gt;  2 Input\r\nSound Detector Envelope &lt;--&gt; A0 Input\r\n--------------------------------------------------------------------------*\/\r\n\r\n\/\/ Initializing the printer:\r\n\r\n#include \"Adafruit_Thermal.h\"\r\n\r\n\/\/ Creating a separate serial channel for the printer specifically\r\n\/\/ to talk to the Arduino\r\n#include \"SoftwareSerial.h\"\r\n#define TX_PIN 6 \/\/ Arduino transmit  YELLOW WIRE  labeled RX on printer\r\n#define RX_PIN 5 \/\/ Arduino receive   GREEN WIRE   labeled TX on printer\r\n\r\nSoftwareSerial mySerial(RX_PIN, TX_PIN); \/\/ Declare SoftwareSerial obj first\r\nAdafruit_Thermal printer(&amp;mySerial);     \/\/ Pass addr to printer constructor\r\n\r\n\/*-----------------------------------------------------------------------*\/\r\n\r\n\/\/ Initializing the SD card:\r\n\r\n#include &lt;SPI.h&gt;\r\n#include &lt;SD.h&gt;\r\n\r\nconst int chipSelect = 4;\r\n\r\n\/*-----------------------------------------------------------------------*\/\r\n\r\n\/\/ Initializing the sound detector connections\r\n\r\n#define PIN_GATE_IN 2\r\n#define PIN_ANALOG_IN A0\r\n\r\n\/*-----------------------------------------------------------------------*\/\r\n\r\n\/\/ Timer variables\r\n\r\nunsigned long timer = 0;\r\nconst int wait = 5000;\r\n\r\n\/*-----------------------------------------------------------------------*\/\r\n\r\nvoid setup() {\r\n\r\n  mySerial.begin(19200);  \/\/ Initialize SoftwareSerial\r\n  printer.begin();        \/\/ Init printer (same regardless of serial type)\r\n  \r\n  \/\/ Open serial communications and wait for port to open:\r\n  Serial.begin(19200);\r\n\r\n  \/\/ see if the card is present and can be initialized:\r\n  if (!SD.begin(chipSelect)) {\r\n    Serial.println(\"Card failed, or not present\");\r\n    \/\/ don't do anything more:\r\n    while (1);\r\n  }\r\n  Serial.println(\"card initialized.\");\r\n\r\n  \/\/ init pin for sound detector\r\n  pinMode(PIN_GATE_IN, INPUT);\r\n  \r\n  delay(10000);\r\n\r\n}\r\n\r\nvoid loop() {\r\n  int value;\r\n\r\n  \/\/ Check the envelope input\r\n  value = analogRead(PIN_ANALOG_IN);\r\n\r\n  \/\/ Convert envelope value into a message\r\n  Serial.print(\"Status: \");\r\n  Serial.println(value);\r\n  delay(1000);\r\n\r\n  \/\/ If sound is loud enough\r\n  if (value &gt;= 20) {\r\n    \/\/ and it's been long enough since the last printing\r\n    if ((millis() - timer) &gt;= wait) {\r\n      timer = millis();\r\n      int i = random(0, 19);\r\n\r\n      \/\/ take a random .txt file\r\n      String path = \"text\" + String(i, DEC) + \".txt\";\r\n      File myFile = SD.open(path);\r\n      String text = \"\";\r\n\r\n      \/\/ and print it\r\n      if (myFile) { \r\n        while (myFile.available()) { \/\/execute while file is available\r\n          char letter = myFile.read(); \/\/read next character from file\r\n          text += letter;\r\n        }\r\n        myFile.close(); \/\/close file\r\n        printer.println(\"\");\r\n        printer.println(text);\r\n        printer.println(\"\");\r\n      }\r\n      else {\r\n          Serial.println(\"error opening \"+path);\r\n      }\r\n    }\r\n  } \r\n}<\/pre>\n<p>&nbsp;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Overview An accessory to an alarm clock which prints out nice quotes in response to sensing the sound of an alarm. A more in-depth video of the full&#8230;<\/p>\n","protected":false},"author":196,"featured_media":14344,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":[],"categories":[89,1],"tags":[],"_links":{"self":[{"href":"https:\/\/courses.ideate.cmu.edu\/60-223\/f2021\/work\/wp-json\/wp\/v2\/posts\/14333"}],"collection":[{"href":"https:\/\/courses.ideate.cmu.edu\/60-223\/f2021\/work\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/courses.ideate.cmu.edu\/60-223\/f2021\/work\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/courses.ideate.cmu.edu\/60-223\/f2021\/work\/wp-json\/wp\/v2\/users\/196"}],"replies":[{"embeddable":true,"href":"https:\/\/courses.ideate.cmu.edu\/60-223\/f2021\/work\/wp-json\/wp\/v2\/comments?post=14333"}],"version-history":[{"count":6,"href":"https:\/\/courses.ideate.cmu.edu\/60-223\/f2021\/work\/wp-json\/wp\/v2\/posts\/14333\/revisions"}],"predecessor-version":[{"id":14410,"href":"https:\/\/courses.ideate.cmu.edu\/60-223\/f2021\/work\/wp-json\/wp\/v2\/posts\/14333\/revisions\/14410"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/courses.ideate.cmu.edu\/60-223\/f2021\/work\/wp-json\/wp\/v2\/media\/14344"}],"wp:attachment":[{"href":"https:\/\/courses.ideate.cmu.edu\/60-223\/f2021\/work\/wp-json\/wp\/v2\/media?parent=14333"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/courses.ideate.cmu.edu\/60-223\/f2021\/work\/wp-json\/wp\/v2\/categories?post=14333"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/courses.ideate.cmu.edu\/60-223\/f2021\/work\/wp-json\/wp\/v2\/tags?post=14333"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}