{"id":205,"date":"2023-11-18T22:26:41","date_gmt":"2023-11-19T02:26:41","guid":{"rendered":"http:\/\/course.ece.cmu.edu\/~ece500\/projects\/f23-teama0\/?p=205"},"modified":"2023-11-18T22:26:41","modified_gmt":"2023-11-19T02:26:41","slug":"hangs-status-report-for-11-18-23","status":"publish","type":"post","link":"http:\/\/course.ece.cmu.edu\/~ece500\/projects\/f23-teama0\/2023\/11\/18\/hangs-status-report-for-11-18-23\/","title":{"rendered":"Hang&#8217;s Status Report For 11.18.23"},"content":{"rendered":"<p><span style=\"font-weight: 400\">This week I spent some time setting up a websocket connection for the communication between the Arduino on the physical board and our web application. Since the physical board isn\u2019t fully set up yet, the only thing I can test is the websocket communication.\u00a0<\/span><\/p>\n<p><img decoding=\"async\" loading=\"lazy\" class=\"alignnone size-full wp-image-206\" src=\"http:\/\/course.ece.cmu.edu\/~ece500\/projects\/f23-teama0\/wp-content\/uploads\/sites\/254\/2023\/11\/Screenshot-2023-11-18-at-9.25.21-PM.png\" alt=\"\" width=\"923\" height=\"86\" srcset=\"http:\/\/course.ece.cmu.edu\/~ece500\/projects\/f23-teama0\/wp-content\/uploads\/sites\/254\/2023\/11\/Screenshot-2023-11-18-at-9.25.21-PM.png 923w, http:\/\/course.ece.cmu.edu\/~ece500\/projects\/f23-teama0\/wp-content\/uploads\/sites\/254\/2023\/11\/Screenshot-2023-11-18-at-9.25.21-PM-300x28.png 300w, http:\/\/course.ece.cmu.edu\/~ece500\/projects\/f23-teama0\/wp-content\/uploads\/sites\/254\/2023\/11\/Screenshot-2023-11-18-at-9.25.21-PM-768x72.png 768w\" sizes=\"(max-width: 767px) 89vw, (max-width: 1000px) 54vw, (max-width: 1071px) 543px, 580px\" \/> <img decoding=\"async\" loading=\"lazy\" class=\"alignnone size-full wp-image-207\" src=\"http:\/\/course.ece.cmu.edu\/~ece500\/projects\/f23-teama0\/wp-content\/uploads\/sites\/254\/2023\/11\/Screenshot-2023-11-18-at-9.25.47-PM.png\" alt=\"\" width=\"963\" height=\"49\" srcset=\"http:\/\/course.ece.cmu.edu\/~ece500\/projects\/f23-teama0\/wp-content\/uploads\/sites\/254\/2023\/11\/Screenshot-2023-11-18-at-9.25.47-PM.png 963w, http:\/\/course.ece.cmu.edu\/~ece500\/projects\/f23-teama0\/wp-content\/uploads\/sites\/254\/2023\/11\/Screenshot-2023-11-18-at-9.25.47-PM-300x15.png 300w, http:\/\/course.ece.cmu.edu\/~ece500\/projects\/f23-teama0\/wp-content\/uploads\/sites\/254\/2023\/11\/Screenshot-2023-11-18-at-9.25.47-PM-768x39.png 768w\" sizes=\"(max-width: 767px) 89vw, (max-width: 1000px) 54vw, (max-width: 1071px) 543px, 580px\" \/><\/p>\n<p><span style=\"font-weight: 400\">In the example above, the client-side is emitting {test: \u201c1\u201d} to the server, and the server simply prints out the message, and emits it back to all clients connected to the socket. The client side then prints out the message it got from the server. Once the board is finished, I can use python\u2019s serial library to read in data from the Arduino and also send data back to the Arduino, and with the server\u2019s websocket, the information can be transferred between the server and the web application.\u00a0<\/span><\/p>\n<p><span style=\"font-weight: 400\">I also spent some time trying to figure out how to connect to the locally hosted web application and backend server from a different computer in the same network. It wasn\u2019t difficult to do this since this was already taken care of by React\u2019s npm command. For the flask server, I simply had to add another flag into the run command. In both cases to connect, it would need my computer\u2019s IP address. The reason I spent some time looking into this is because it was suggested that we make the communication between the web application and the physical board wireless. As such, I\u2019m planning on running a flask server on a Raspberry Pi connected directly to the Arduino. This flask server would have the websocket as shown above for wireless bidirectional communication between the board and the web application.<\/span><\/p>\n<p><span style=\"font-weight: 400\">While my progress is technically on track since I\u2019m working on the communication steps now, I had a pretty heavy fever for half of the week, so I didn\u2019t get to work on the project as much as I planned to. The Raspberry Pi component currently isn\u2019t a priority, as the building of the physical board is. I will need to help Israel with the construction of the board, however, by next week, I can still test out running a flask server on a Raspberry Pi.<\/span><\/p>\n","protected":false},"excerpt":{"rendered":"<p>This week I spent some time setting up a websocket connection for the communication between the Arduino on the physical board and our web application. Since the physical board isn\u2019t fully set up yet, the only thing I can test is the websocket communication.\u00a0 In the example above, the client-side is emitting {test: \u201c1\u201d} to &hellip; <\/p>\n<p class=\"link-more\"><a href=\"http:\/\/course.ece.cmu.edu\/~ece500\/projects\/f23-teama0\/2023\/11\/18\/hangs-status-report-for-11-18-23\/\" class=\"more-link\">Continue reading<span class=\"screen-reader-text\"> &#8220;Hang&#8217;s Status Report For 11.18.23&#8221;<\/span><\/a><\/p>\n","protected":false},"author":791,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[5,4],"tags":[6],"_links":{"self":[{"href":"http:\/\/course.ece.cmu.edu\/~ece500\/projects\/f23-teama0\/wp-json\/wp\/v2\/posts\/205"}],"collection":[{"href":"http:\/\/course.ece.cmu.edu\/~ece500\/projects\/f23-teama0\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/course.ece.cmu.edu\/~ece500\/projects\/f23-teama0\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/course.ece.cmu.edu\/~ece500\/projects\/f23-teama0\/wp-json\/wp\/v2\/users\/791"}],"replies":[{"embeddable":true,"href":"http:\/\/course.ece.cmu.edu\/~ece500\/projects\/f23-teama0\/wp-json\/wp\/v2\/comments?post=205"}],"version-history":[{"count":1,"href":"http:\/\/course.ece.cmu.edu\/~ece500\/projects\/f23-teama0\/wp-json\/wp\/v2\/posts\/205\/revisions"}],"predecessor-version":[{"id":208,"href":"http:\/\/course.ece.cmu.edu\/~ece500\/projects\/f23-teama0\/wp-json\/wp\/v2\/posts\/205\/revisions\/208"}],"wp:attachment":[{"href":"http:\/\/course.ece.cmu.edu\/~ece500\/projects\/f23-teama0\/wp-json\/wp\/v2\/media?parent=205"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/course.ece.cmu.edu\/~ece500\/projects\/f23-teama0\/wp-json\/wp\/v2\/categories?post=205"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/course.ece.cmu.edu\/~ece500\/projects\/f23-teama0\/wp-json\/wp\/v2\/tags?post=205"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}