Since the start of quarantine for COVID-19, almost all gyms have been shut down due to safety concerns. Gyms are one of the unsafest places during the pandemic because of all the sweat and germs transmitted between people. Before the pandemic hit, most of us were finally building up that daily routine to go to the gym at least 3-4 times a week to hit the grind, but with COVID, everything changed.
Since quarantine in March, all of us have been locked in our rooms and glued to our laptop screens. Over the months, we have all been slacking in our chairs, eating food, and only gaining weight. On top of that, during the first three months, everyone feared even stepping out of their house to check their mail or even go on a short walk.
However, during this time, a small percentage of people took this extra time as an advantage to build a home gym and continue their daily workout just from the comfort of their homes. Even the slightest bit of exercise like running on the treadmill or using the pull-up bar benefits your physical health in so many ways.
It took a couple of months for all of us to realize that instead of spending an extra hour playing Valorant or Rocket League, we could go downstairs to the garage and burn a couple of calories. However, setting up a home gym is quite expensive, and it doesn't have all the facilities an average gym may have. Some people use home gyms for burning off fat through cardio, while others use home gyms to gain muscle fast. Both types of gyms serve the same purpose: burn calories and maintain your physical health, but they differ in the kind of equipment they use.
Ever since our friends started working out, we got motivated to work out, but all the equipment was costly to purchase, so we would go to some of our friends' houses on the weekends for a workout session. Over time, we started going to a couple of other friends' houses who all had different sorts of equipment, and it helped me better work out different muscles.
Sometimes it would have been nice to show up at our friends' house based on our time preference and get to choose whatever equipment we prefer on that day, just like how Airbnb would work. This is where the idea of GymShare comes in.
What it does
GymShare is a web application and an app designed to prompt the user to work out in a nearby gym or register your home gym on the platform. It's pretty much like an Airbnb, but just for gyms. People can book their gym nearby through the Website or app, based on their preferences for what gym equipment they want to use and how far it is from their house. When the user logins on to the Website, they are prompted to make an account, where they would enter their personal information, like their full name, email, phone number, height, and weight. The machine learning algorithm would calculate the user's best fitness plan and recommend a gym nearby with the necessary equipment based on the information they would upload.
We have also built a companion fitness tracker that integrates with our platform. The tracker helps share data to the user on the intensity of their workout and the calories they burned. This data is beneficial to the user, as it allows them to determine what activities help them the most and which gyms they should book.
Our fitness tracker was built using the Raspberry Pi Zero W and the SW-420 motion sensor; it is programmed to detect how many calories you burned and your workout intensity. This data is sent to a google form which is accessed through flask on the backend of our Website, and it updates based on new data collected from the Hardware.
How we built it
We used several different technologies to put this all together. Utilizing flask, we built a dynamic form that allowed us to collect data from the user to determine the best workout plan and which gyms they should book. Through HTML 5, we built an eye-catching landing page that is easy and simple to use to understand the product, log in to your dashboard, and gather information. We used Google Cloud technologies like firebase, maps API, google drive API for spreadsheets (data collection) and sign-in. We used raspberry pi and python to build the hardware component to the project, a fitness tracker. We also used the Twilio API to send live notifications to the user about information like the gym has been booked. Your workout has started, calorie updates, and post-work-out information. Data such as calories burnt and intensity of training is collected from the raspberry pi and pushed onto a google sheet, and from there is updated on the Website with the latest data on your workout.
For the user data collection portion of our project, we used the Flask API to collect user data regarding their body statistics and their objectives when working out to give them the best and most accurate workout plan. They can then choose their appropriate gym based on their needs to achieve their long-desired goals with ease. We used the Google Maps API to display gyms located near the user to find this appropriate gym efficiently and in an organized fashion. Additionally, we took the data collected from the movement sensor to graph the user's intensity and calories exerted to see where they stand during every point of their workout. This only makes it easier for them to pinpoint their strengths and weaknesses, which gives them a more productive activity and a chance to improve.
Using a movement sensor (SW-420) for the raspberry pi, we built a fitness tracker similar to a Fitbit. This tracker integrates directly with our platform by sending reminders via Twilio, adding workout data (calories, intensity, workout start/stop), and displaying graphs to help you improve your workout.
Challenges we ran into
We were having issues connecting the Hardware to our platform, but we overcame this by using google drive API to share data over spreadsheets. At the last minute, our code fell apart and began to throw a bunch of errors, so we had to come back and put it all together.
We also encountered some issues regarding inputting data through a flask form and exporting it to a database. Still, we overcame this by looking through the documentation carefully and adding the appropriate APIs through the Google Cloud Platform. We had some trouble integrating the Map, which included gyms in proximity to the user. Still, we overcame this by approaching some mentors from the LA Hacks channel and reading through the documentation and questions similar to those we asked on Stackoverflow. We also had some trouble using Google Firebase to add a Register/Sign-in component to our Website, but we solved this by using Authlib.
Accomplishments that we're proud of
We are proud that we could put together an elaborate project with unique components together in such a short amount of time. We were also delighted to document the entire process thoroughly via devpost and Github readme, something that we often overlook when making hackathon projects. Most of all, we are very proud to have developed this project, which not just benefits our community for their physical well-being, but also helps to reduce our daily global footprint. The benefit of a home gym takes away from all the electricity and energy needed to power the gyms.
What we learned
This is one of the most productive hackathons for all members of the team. We learned so many new things that all contributed to building this project. We learned how to design an HTML/CSS/JS-powered website application to fit a unified color palette. We also learned about how we can integrate form data and inputs through a flask function to input them into a database which then goes into a user's profile for their viewing. Additionally, we learned how to integrate data collected from our motion sensor into a beautiful graphic format.
What's next for GymShare
Utilizing GymShares platform and fitness tracker, we plan to add ML to analyze workouts and help. We hope to optimize the user's data to provide them with more fitness information, such as a meal/diet plan that could keep the user more healthy. We hope to update our hardware component with more data collection features, such as a heart rate monitor, specific workout trackers, and step counter, to make our data more accurate. All in all, these additions would further our unique and intelligent approach to fitness with a strong focus on accessibility and ease-of-use.