Personal Weekly Update | Carolyn | 3/29
Accomplishments
Over the past week, I’ve made good progress in building out the core infrastructure and interface for the app, successfully integrating Bluetooth-app communication with Zoe, and adding some more user experience features.
Bluetooth + ESP32+ App Integration
I was able to successfully connect the iOS app to the ESP32 using BLE. During lab on Wednesday, I initially had some issues with UUID characteristic/service recognition when scanning for BLE devices but this was resolved by modifying the format of characteristic UUIDs. I implemented some more functionality to scan, connect and subscribe to notifications from characteristic IDs to fully flesh out the calibration flow. When developing the functionality on the app side, it was helpful to simulate the Bluetooth connectivity with the ESP32 using a third-party BLE app with Zoe’s help to test Bluetooth workflows. This allowed me to incrementally configure the software so that way it performed correctly and was able to ultimately send signals and read data.
Calibration
Regarding calibration, I coordinated calibration timing and data flow with Zoe to ensure synchronization between the ESP32 and the app. I initially faced challenging appending sensor data due to model type issues and incorrect parsing. But I resolved parsing and persistence issues by modifying my Ride model and adjusting how sensor readings are handled.
Ride Workflow
I was able to implement a full ride lifecycle by sending a start ride signal to the ESP32, collecting and storing parsed sensor data in a model, and then sending the stop signal to the ESP32, storing data and end timing.
UI + Experience
I designed a clean bottom navigation bar for switching between Home, Record, and Profile tabs. I also added a menu style in the home tab for easier logout access. These changes ultimately were design additions to make our app easier to use before the demo. In addition, I implemented the ProfileView which dynamically displays all past rides taken by the user. Each ride card shows time, duration, and placeholders for average heart rate and calories burned. The placeholders are there for now but I hope to get the Watch integration done after our demo. For now, I have added a placeholder for insights like form analytics and data visualization but more advanced graphing will be goals for the following weeks.
Progress Status
We’re on track for the demo next week. I’m glad the Bluetooth integration went very smoothly. I’m a little behind on the storage mechanisms – I did some more research on data storage and found that SwiftData will be the best framework to use for data management and modeling given its additional compatibility with Swift.Charts. But besides that, a good chunk of the infrastructure has been completed and I’m in a good place to work with additional APIs and frameworks to add additional features.
Next Steps
Next week I plan on modifying my models to utilize SwiftData instead of @AppStorage. In addition, I plan on working with Zoe on the “during-ride alerts” for incorrect posture and providing the correct voice feedback based on the alert type. I plan on implementing 2 data visualizations for next week: a bar chart mapping the frequency of each type of form error as well as a line graph displaying the form score over time. This will require working with Rita and Zoe on our detection algorithm and refining any possible thresholds given possible variations in our force sensor readings after putting fabric over them. As a stretch goal, I hope to work on the Apple Watch integration next week and integrate our “stop” and “start” ride with starting a Cycling ride on your watch that way I can pull biometric data and display it accordingly.
Demo Media