{"id":171,"date":"2024-11-01T18:16:13","date_gmt":"2024-11-01T18:16:13","guid":{"rendered":"http:\/\/course.ece.cmu.edu\/~ece500\/projects\/f24-teamc4\/?p=171"},"modified":"2024-11-01T18:16:50","modified_gmt":"2024-11-01T18:16:50","slug":"jessies-status-report-for-11-02","status":"publish","type":"post","link":"http:\/\/course.ece.cmu.edu\/~ece500\/projects\/f24-teamc4\/2024\/11\/01\/jessies-status-report-for-11-02\/","title":{"rendered":"Jessie&#8217;s Status Report for 11\/02"},"content":{"rendered":"<p><strong>This week\u2019s tasks:<\/strong><\/p>\n<ul>\n<li style=\"font-weight: 400\"><span style=\"font-weight: 400\">I started the week by setting the RPi so I could ssh into it from my laptop. I had trouble doing this on my hotspot or the school wifi, but I could do it on my home wifi. Additionally, we needed to connect the RPi to some I\/O (monitor, keyboard, and mouse) to connect the RPi to wifi. This is not feasible in the future when we need to use the RPi on campus. We plan to register the device to the CMU device wifi and get that set up next week. More long term, we plan to look into incorporating our code into the booting so that the program is automatically running when the RPi is booted up. We hope that if we do this, the user will not have to ssh into the RPi to run our code and therefore not even need to worry about connecting the RPi to wifi.\u00a0<\/span><\/li>\n<li style=\"font-weight: 400\"><span style=\"font-weight: 400\">I tried to go through<a href=\"https:\/\/www.hackster.io\/AlbertaBeef\/accelerating-the-mediapipe-models-on-raspberry-pi-5-ai-kit-1698fe\"> the tutorial<\/a> mentioned in last week\u2019s status report for putting the MediaPipe model on the RPi that was mentioned; however, I was unable to get their script to work since the accelerator component hasn\u2019t arrived yet. We believe the part will come early next week.<\/span>\n<ul>\n<li style=\"font-weight: 400\"><span style=\"font-weight: 400\">As a fallback plan in case the accelerator doesn\u2019t work and out of curiosity about the speed of the model without an accelerator, I followed <a href=\"https:\/\/github.com\/google-ai-edge\/mediapipe-samples\/blob\/main\/examples\/hand_landmarker\/raspberry_pi\/README.md\">this tutorial<\/a> to run the MediaPipe model on the RPi<\/span><span style=\"font-weight: 400\">. It seems to consistently run at 10 fps, even when there is movement in the frame. For some reason, the model can only detect one hand at a time. The accelerated tutorial seemed able to detect 2 hands at a time, so we can reevaluate this issue once the accelerator comes in.\u00a0<\/span><img decoding=\"async\" loading=\"lazy\" class=\"alignnone size-full wp-image-172\" src=\"http:\/\/course.ece.cmu.edu\/~ece500\/projects\/f24-teamc4\/wp-content\/uploads\/sites\/331\/2024\/11\/IMG_5322.jpg\" alt=\"\" width=\"3829\" height=\"2537\" srcset=\"http:\/\/course.ece.cmu.edu\/~ece500\/projects\/f24-teamc4\/wp-content\/uploads\/sites\/331\/2024\/11\/IMG_5322.jpg 3829w, http:\/\/course.ece.cmu.edu\/~ece500\/projects\/f24-teamc4\/wp-content\/uploads\/sites\/331\/2024\/11\/IMG_5322-300x199.jpg 300w, http:\/\/course.ece.cmu.edu\/~ece500\/projects\/f24-teamc4\/wp-content\/uploads\/sites\/331\/2024\/11\/IMG_5322-768x509.jpg 768w, http:\/\/course.ece.cmu.edu\/~ece500\/projects\/f24-teamc4\/wp-content\/uploads\/sites\/331\/2024\/11\/IMG_5322-1024x678.jpg 1024w\" sizes=\"(max-width: 767px) 89vw, (max-width: 1000px) 54vw, (max-width: 1071px) 543px, 580px\" \/><\/li>\n<\/ul>\n<\/li>\n<li style=\"font-weight: 400\"><span style=\"font-weight: 400\">I shopped around for displays for the calibration step. Most were fairly big (7 inches), advanced (unnecessary features like touch screen), and expensive (around $60). I ended up landing on <a href=\"https:\/\/www.amazon.com\/2inch-IPS-LCD-Display-Module\/dp\/B082GFTZQD\/ref=asc_df_B082GFTZQD\/?tag=hyprod-20&amp;linkCode=df0&amp;hvadid=693554129961&amp;hvpos=&amp;hvnetw=g&amp;hvrand=24228905891027284&amp;hvpone=&amp;hvptwo=&amp;hvqmt=&amp;hvdev=c&amp;hvdvcmdl=&amp;hvlocint=&amp;hvlocphy=9005929&amp;hvtargid=pla-1948074252853&amp;mcid=48114922c40236c992012ef59e9e4333&amp;th=1\">this one<\/a><\/span><span style=\"font-weight: 400\">\u00a0because it is smaller and cheap. We were slightly worried about the 2-inch display being too small; however, we thought it was reasonable as it\u2019s bigger than the screen of a smartwatch. Once the display has arrived, I will look into how to interface it with the RPi.<\/span><\/li>\n<li style=\"font-weight: 400\"><span style=\"font-weight: 400\">Shaye was able to find a buzzer. I tried to write some basic test code to interface with it. The code I wrote can be found in the accelerated_rpi folder of <a href=\"https:\/\/github.com\/mich-elle-xu\/backintune\">this Github repo<\/a><\/span><span style=\"font-weight: 400\">. You can look at the commit history to see the different iterations of code I tried. The final version of the code is on the jessie_branch (I forgot to branch my code earlier). Shaye informed me that this is a passive buzzer, so it takes in a square wave and buzzes at the frequency of the square wave. I tried to use different libraries with the GPIO pins and struggled to get the buzzer to buzz at a loud volume (you can see my struggles in the multiple iterations of code). However, with the help of Shaye, we were able to max out the volume of the passive buzzer by tinkering with the frequency. The max volume of the passive buzzer is still somewhat quiet and we\u2019re not sure if the user will be able to hear it well over piano playing, so Shaye plans to acquire an active buzzer. I will have to write different code to interface with this active buzzer in the coming weeks.\u00a0<\/span>\n<ul>\n<li>Here is a link to some video of the buzzer with piano in the background:\u00a0<a href=\"https:\/\/drive.google.com\/file\/d\/1GE6zB6sEb07_hdlClQzQO-LpfjCWQq9t\/view?usp=sharing\">https:\/\/drive.google.com\/file\/d\/1GE6zB6sEb07_hdlClQzQO-LpfjCWQq9t\/view?usp=sharing<\/a>. In the video, the camera is closer to the buzzer than the piano and the keyboard is set to a low volume.<\/li>\n<\/ul>\n<\/li>\n<li style=\"font-weight: 400\"><span style=\"font-weight: 400\">I attempted to interface UART between the 2 RPis. You can find the sample code on jessie_branch in the same <a href=\"https:\/\/github.com\/mich-elle-xu\/backintune\">Github repo<\/a><\/span><span style=\"font-weight: 400\">. The sender code is in the accelerated_rpi directory and the receiver code is in the host_rpi directory. I was unable to get this sample UART code to work\u2013 the code doesn\u2019t print anything so the receiver isn&#8217;t receiving anything.\u00a0 I suspect this is because the host_rpi is running on Linux OS (for Danny\u2019s web app needs), so the UART setup is a little different. I\u2019m not sure if I set up UART correctly on the receiver RPi because when I look for serial ports, none of the common ones show up; therefore I don\u2019t think I\u2019m using the right port in the receiver code. Next week I plan to look into other ways to do UART.\u00a0<\/span>\n<ul>\n<li style=\"font-weight: 400\"><span style=\"font-weight: 400\">Currently, I\u2019m using the tx and rx pins, but Shaye has suggested I also try using the dedicated UART JST pins. For these pins, I won\u2019t be able to use jumper cables, so I\u2019ll need to acquire JST pins.\u00a0<\/span><\/li>\n<li style=\"font-weight: 400\"><span style=\"font-weight: 400\">Another possible option we can explore is using the USB port instead. I\u2019ll need to acquire a USB-to-USB cable for this approach.\u00a0<\/span><\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<p><strong>Schedule:<\/strong><\/p>\n<p><span style=\"font-weight: 400\">I am still roughly on schedule as though I haven&#8217;t finished the accelerated MediaPipe on RPi tutorial (waiting to receive the accelerator), I did get the model on the RPi and I have made progress with interfacing I\/O on the RPi (UART, buzzer, display).\u00a0<\/span><\/p>\n<p><strong>Next week\u2019s deliverables:<\/strong><\/p>\n<ul>\n<li style=\"font-weight: 400\"><span style=\"font-weight: 400\">Get the RPi working on the school wifi.\u00a0<\/span><\/li>\n<li style=\"font-weight: 400\"><span style=\"font-weight: 400\">Finish the tutorial and accelerate the model on the RPi.\u00a0<\/span><\/li>\n<li style=\"font-weight: 400\"><span style=\"font-weight: 400\">Write new code for the active buzzer.\u00a0<\/span><\/li>\n<li style=\"font-weight: 400\"><span style=\"font-weight: 400\">Get UART working between the 2 RPis.<\/span><\/li>\n<\/ul>\n<p><span style=\"font-weight: 400\">Some future tasks that are less time-sensitive:<\/span><\/p>\n<ul>\n<li style=\"font-weight: 400\"><span style=\"font-weight: 400\">Look into adding code to the boot so we don\u2019t have to connect to wifi<\/span><\/li>\n<li style=\"font-weight: 400\"><span style=\"font-weight: 400\">Connect fans to RPi<\/span><\/li>\n<li style=\"font-weight: 400\"><span style=\"font-weight: 400\">Connect the display to RPi<\/span><\/li>\n<\/ul>\n","protected":false},"excerpt":{"rendered":"<p>This week\u2019s tasks: I started the week by setting the RPi so I could ssh into it from my laptop. I had trouble doing this on my hotspot or the school wifi, but I could do it on my home wifi. Additionally, we needed to connect the RPi to some I\/O (monitor, keyboard, and mouse) &hellip; <\/p>\n<p class=\"link-more\"><a href=\"http:\/\/course.ece.cmu.edu\/~ece500\/projects\/f24-teamc4\/2024\/11\/01\/jessies-status-report-for-11-02\/\" class=\"more-link\">Continue reading<span class=\"screen-reader-text\"> &#8220;Jessie&#8217;s Status Report for 11\/02&#8221;<\/span><\/a><\/p>\n","protected":false},"author":936,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[11],"tags":[5,9],"_links":{"self":[{"href":"http:\/\/course.ece.cmu.edu\/~ece500\/projects\/f24-teamc4\/wp-json\/wp\/v2\/posts\/171"}],"collection":[{"href":"http:\/\/course.ece.cmu.edu\/~ece500\/projects\/f24-teamc4\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/course.ece.cmu.edu\/~ece500\/projects\/f24-teamc4\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/course.ece.cmu.edu\/~ece500\/projects\/f24-teamc4\/wp-json\/wp\/v2\/users\/936"}],"replies":[{"embeddable":true,"href":"http:\/\/course.ece.cmu.edu\/~ece500\/projects\/f24-teamc4\/wp-json\/wp\/v2\/comments?post=171"}],"version-history":[{"count":2,"href":"http:\/\/course.ece.cmu.edu\/~ece500\/projects\/f24-teamc4\/wp-json\/wp\/v2\/posts\/171\/revisions"}],"predecessor-version":[{"id":174,"href":"http:\/\/course.ece.cmu.edu\/~ece500\/projects\/f24-teamc4\/wp-json\/wp\/v2\/posts\/171\/revisions\/174"}],"wp:attachment":[{"href":"http:\/\/course.ece.cmu.edu\/~ece500\/projects\/f24-teamc4\/wp-json\/wp\/v2\/media?parent=171"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/course.ece.cmu.edu\/~ece500\/projects\/f24-teamc4\/wp-json\/wp\/v2\/categories?post=171"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/course.ece.cmu.edu\/~ece500\/projects\/f24-teamc4\/wp-json\/wp\/v2\/tags?post=171"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}