What did you personally accomplish this week on the project? Give files or photos that demonstrate your progress. Prove to the reader that you put sufficient effort into the project over the course of the week (12+ hours).
- This week I completed our hint retrieval latency and accuracy test. I tested our entire database of puzzles, gathering timing and performance accuracy metrics with regards to the hint retrieval. I recorded how many words from each puzzle did not have any definitions nor context retrieved by the merriam webster dictionary API, and I timed how long each API call took. I then analyzed this data to gather statistical performance metrics in terms of average latency of hint retrieval and the quality of the retrieval.
- I found that there were puzzles that have unretrieved hints for multiple words, which is unideal for the use case of our project, so supplemented our dictionary API hint retrieval with hints generated from an LLM (in our case, gemini flash-2.0 model). I then tested the entire database again with this new capability and did a quality/latency trade-off study on the different LLM models available and different mixtures of APIs.
- I helped to construct the final grid. I helped come up with a solution to our pogo pin alignment problem and also helped in physically soldering connections on the circuit boards and other wired components on the grid. I then helped to debug the final circuits as there were some accidental shorts.
- I rewrote the web app to use SocketIO in place of the POST requests I was mainly using in our previous implementation. Previously, I was having trouble with getting the sockets to work consistently on the RPi as it seemed some signals were just never received. I had implemented a work-around using the return status codes of POST requests instead of socket signals, but after testing out our final grid implementation and seeing that we still suffered from alignment/connection issues, we decided that we would need to implement an error message feature that would require the use of sockets for one-way server to client communication. I was able to get a flask-socketio implementation to work on my mac laptop using a greenlet (eventlet) framework (I figured out that the issue I was facing before was due to the synchronous nature of the socketio function calls, but when it came time to integrate it onto the RPi, I ran into issues.
- It turns out that eventlet/gevent (greenlet frameworks) are incompatible with the RPi.GPIO library since they require monkey-patching in order to enable asynchronous socket capabilities. I needed monkey-patching to get the sockets to work, but it turns out this implementation is not possible to run on the RPi. Instead of eventlet, I researched other alternatives and ultimately found that uvicorn, an ASGI web server, along with python’s native asyncio package should work with RPi GPIO. However, this package does not have Flask support, so I rewrote the entire Flask backend as a FastAPI backend instead. I then translated the appropriate frontend socket logic as needed, then reintegrated with the RPi and found that it worked great.
Is your progress on schedule or behind? If you are behind, what actions will be taken to catch up to the project schedule?
- My progress is a little behind schedule because we were having lots of issues during integration for the final product. As a result, I didn’t get to do as much user testing this week as I wanted to. However, now everything (minus aesthetics) is basically done and ready for user testing, so I will block out time next week to finish the user testing that I didn’t get to do this week.
What deliverables do you hope to complete in the next week?
- Next week I hope to complete our user testing. I also want to get started on the poster and final report. Additionally, I will work on making our project more aesthetic (think about painting/branding).
- I also want to implement a feature on the web app where it displays the position of the block that is missing instead of just generically saying that a block is missing.
As you’ve designed, implemented and debugged your project, what new tools or new knowledge did you find it necessary to learn to be able to accomplish these tasks? What learning strategies did you use to acquire this new knowledge?
We recognize that there are quite a few different methods (i.e. learning strategies) for gaining new knowledge — one doesn’t always need to take a class, or read a textbook to learn something new. Informal methods, such as watching an online video or reading a forum post are quite appropriate learning strategies for the acquisition of new knowledge.
- I had to learn about backend frameworks such as Flask and FastAPI, CORS policies, as well as using web sockets in python. To learn about these frameworks, I watched many tutorial videos on building React + Flask/FastAPI applications, and read deep into the documentation about the SocketIO/Flask-SocketIO and asyncio packages for python. Additionally, I had to read many stack exchange and discussion forum posts to diagnose specific issues I was having with integrating the web app on the RPi and with CORS issues.
- I also had to learn how to use the merriam webster dictionary API and particularly how to parse the json response from it. In order to do this, I read the github pages of other authors who created wrappers for the merriam webster API to get inspiration.
- Finally, I had to learn about using generative LLM APIs such as gemini. To do this, I read deep into the documentation and read through their provided example programs.