{"id":338,"date":"2024-12-08T00:20:53","date_gmt":"2024-12-08T00:20:53","guid":{"rendered":"http:\/\/course.ece.cmu.edu\/~ece500\/projects\/f24-teamc2\/?p=338"},"modified":"2024-12-08T00:20:53","modified_gmt":"2024-12-08T00:20:53","slug":"shannons-status-report-12-7-24","status":"publish","type":"post","link":"https:\/\/course.ece.cmu.edu\/~ece500\/projects\/f24-teamc2\/2024\/12\/08\/shannons-status-report-12-7-24\/","title":{"rendered":"Shannon&#8217;s Status Report 12\/7\/24"},"content":{"rendered":"<p><span style=\"font-weight: 400\">This week, since I was done with everything I was in charge of, I focused my all into helping Jeffrey catch up on his parts. Jeffrey was able to have the Study Session start working, where when a user clicks start session on the WebApp, the robot display screen is able to start a timer. However, he was unable to get the pause\/resume or the end session to work. As such, I sat down with him and we worked on these features. I noticed that he had a lot of debugging statements on the robot, which was good, but he wasn\u2019t really logging anything on the WebApp. Following my advice, he did so and we realised that the event was being emitted from the RPi but it was not being received on the WebApp based on the logs. I also noticed that he had a log for when the WebSocket connected on the start but not on the in progress page and so I recommended that he add that. After he added that, I noticed that on the in progress page, the connection log was not appearing and so we waited until it appeared and then we tested the pause\/resume button and it worked. Thus, we managed to debug that the issue had to do with latency. We then resolved this by switching the transport to WebSockets from Polling, and that fixed the latency issue. Then, we worked to debug why the End Session on the WebApp was not being received on the robot end. Once again, based on checking the logs, I deduced that it was probably because the events were being emitted wrongly and so the robot event handlers could not catch them. We tried fixing it to receive that event that was being sent by the WebApp instead and it worked \u2013 we finished a <\/span><span style=\"font-weight: 400\">standard study session<\/span><span style=\"font-weight: 400\">! This was done on Wednesday. After this, I took over all TTS and Study Session related work, but Jeffrey will work on the last part of hardware integration with the pause\/resume buttons. <\/span><span style=\"font-weight: 400\"><br \/>\n<\/span><span style=\"font-weight: 400\"><br \/>\n<\/span><span style=\"font-weight: 400\">On Thursday, I then integrated my TTS code, and ran into some issues with the RPi trying to play audio from a \u201cdefault\u201d device and failing. After some quick troubleshooting, I decided to write a config file to set the default device to the port that the speaker was plugged into and it worked! The text-to-speech feature was working well, and there was barely any detectable difference in latency between the audio playing on the user\u2019s computer and on the RPi through the speakers. I tested it some more to make sure it worked with various different .txt files, and when I was satisfied with the result, I moved on to <\/span><span style=\"font-weight: 400\">integration with the Study Session<\/span><span style=\"font-weight: 400\"> feature. I worked on making sure TTS worked only while a study session was in progress (not paused). I wrote and tested some code but it was buggy and I could not get the redirection to work like I desired. I wanted it such that in the case that a Study Session had not been created yet, that the user clicking on the text-to-speech feature on the WebApp would redirect them to the create a new study session and if there was a Study Session that has been created but was on pause, it would redirect them to it. I also wanted to handle the case where if a user was using the text-to-speech feature, and the goal duration was reached, then the user going back to the study session would still trigger the pop-up to occur asking if they would like to continue or stop the session since the target duration has been reached.<\/span><\/p>\n<p><span style=\"font-weight: 400\">On Friday, I continued to work on these features, and I managed to successfully debug them. The text-to-speech feature worked well alongside the Study Session and exhibited the desired behavior I wanted. I then worked on the <\/span><span style=\"font-weight: 400\">Pomodoro Study Session<\/span><span style=\"font-weight: 400\"> feature, which implemented a built-in break for the user based on what they set at the start of the study session. I worked on the WebApp and the RPi, ensuring that the study and break intervals were sent correctly, and then to have it such that the study and break intervals worked, I had to create another background clock that ran alongside the display clock. The standard study session only needed a display clock since the user was in charge of pausing and resuming sessions, but since the pomodoro study session has to keep track of when to pause and resume the session automatically while sending a break reminder audio, it required a separate clock. I wrote and debugged this code and it worked well. This is also when I discovered that the text-to-speech feature could not occur at the same time due to the break reminder being played as well, and so I made a slight design change to prevent this.<\/span><\/p>\n<p><span style=\"font-weight: 400\">Today, I will work on cleaning up the WebApp code, help Jeffrey with any RPS issues that he may face, and start on the final poster.<\/span><\/p>\n<p><span style=\"font-weight: 400\">According to the Gantt chart and the newly linked final week schedule, I am on target.<\/span><\/p>\n<p><span style=\"font-weight: 400\">In the next week I will work on:<\/span><\/p>\n<ul>\n<li style=\"font-weight: 400\"><span style=\"font-weight: 400\">Final overall testing with my group<\/span><\/li>\n<li style=\"font-weight: 400\"><span style=\"font-weight: 400\">Final poster, video, demo and report<\/span><\/li>\n<\/ul>\n","protected":false},"excerpt":{"rendered":"<p>This week, since I was done with everything I was in charge of, I focused my all into helping Jeffrey catch up on his parts. Jeffrey was able to have the Study Session start working, where when a user clicks start session on the WebApp, the robot display screen is able to start a timer. &hellip; <\/p>\n<p class=\"link-more\"><a href=\"https:\/\/course.ece.cmu.edu\/~ece500\/projects\/f24-teamc2\/2024\/12\/08\/shannons-status-report-12-7-24\/\" class=\"more-link\">Continue reading<span class=\"screen-reader-text\"> &#8220;Shannon&#8217;s Status Report 12\/7\/24&#8221;<\/span><\/a><\/p>\n","protected":false},"author":969,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[4],"tags":[19,8,23,14,9],"_links":{"self":[{"href":"https:\/\/course.ece.cmu.edu\/~ece500\/projects\/f24-teamc2\/wp-json\/wp\/v2\/posts\/338"}],"collection":[{"href":"https:\/\/course.ece.cmu.edu\/~ece500\/projects\/f24-teamc2\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/course.ece.cmu.edu\/~ece500\/projects\/f24-teamc2\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/course.ece.cmu.edu\/~ece500\/projects\/f24-teamc2\/wp-json\/wp\/v2\/users\/969"}],"replies":[{"embeddable":true,"href":"https:\/\/course.ece.cmu.edu\/~ece500\/projects\/f24-teamc2\/wp-json\/wp\/v2\/comments?post=338"}],"version-history":[{"count":1,"href":"https:\/\/course.ece.cmu.edu\/~ece500\/projects\/f24-teamc2\/wp-json\/wp\/v2\/posts\/338\/revisions"}],"predecessor-version":[{"id":339,"href":"https:\/\/course.ece.cmu.edu\/~ece500\/projects\/f24-teamc2\/wp-json\/wp\/v2\/posts\/338\/revisions\/339"}],"wp:attachment":[{"href":"https:\/\/course.ece.cmu.edu\/~ece500\/projects\/f24-teamc2\/wp-json\/wp\/v2\/media?parent=338"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/course.ece.cmu.edu\/~ece500\/projects\/f24-teamc2\/wp-json\/wp\/v2\/categories?post=338"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/course.ece.cmu.edu\/~ece500\/projects\/f24-teamc2\/wp-json\/wp\/v2\/tags?post=338"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}