Skip to content

A system for managing a gym. RaspberryPi application allows users to enter and leave the gym, while Flask-based app displays information about users and their trainings.

Notifications You must be signed in to change notification settings

bfokss/gym-timer

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

71 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

GymTimer


Collegium Da Vinci - Cloud Computing and IoT class


About project



This project purpose is to read RFID cards through Raspberry Pi with this application installed and ran on it. Then in the web app generated by Flask you can manage users and their cards, as well as check when they used their cards and check the length of their "gym sessions"



Project structure


  1. Raspberry Pi with RC522, 3 LED's connected. (runs .NET 6 app)

  2. Azure Functions handling RFID Card inputs to database.

  3. Azure MS SQL Database

  4. Flask web application



Before you start


  1. Copy this repository to your computer.

     git clone https://github.com/bfokss/cdv-cc-project.git
    
  2. Deploy this folder to Azure Functions App Service, creating new Azure function.

  3. Put contents of this folder on Raspberry Pi and create config.json file.

     {
     "url": "YOUR_AZURE_FUNCTION_URL"
     }
    
  4. Run the .NET application on Raspberry Pi using:

     dotnet run
    
  5. Create Config.py inside of main folder. It should contain one const. Example:

     CONNECTION_STRING = 'YOUR_CONNECTION_STRING_USING_ODBC'
    
  6. Before you start working on the Flask project, please create and activate virtual environment inside of main folder based on the requirements.txt file. Don't know how to do it? Check out this tutorial.

  7. Now activate venv and create first migration to update your database's structure.

     flask db migrate
     flask db upgrade
    
  8. Finally, when venv is activated simply run:

     flask run
    

    or

     py app.py
    
  9. Now head over to your localhost address. It should look like this:

     http://localhost:5000
    

    or

     http://127.0.0.1:5000
    

Using app

  1. Home page

Home page gif

  1. User profile (Without active gym session)

User profile no session gif

  1. User profile (With active gym session)

User profile session gif

  1. User sessions

User sessions gif

  1. Adding user

Adding user gif

  1. Listing users

Listing users gif

  1. Assigning users to cards

Assigning users to cards gif

  1. Adding card

Adding cards gif

  1. Listing cards

Listing card gif


Authors



About

A system for managing a gym. RaspberryPi application allows users to enter and leave the gym, while Flask-based app displays information about users and their trainings.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published