The ultimate devops machine.
This project supports the creation of a vault box that will store candies for developers. As soon as a development task gets solved the developer will be able to open the vault using his or her personal RFID vault card. On the other hand the vault will remain closed if the developer is not having candies available.
Parts needed:
- Raspberry Pi 1 Model B+ - A tiny board able to handle both the needed hardware and software parts.
- RFID RC522 - A hardware module to read RFID cards
- Servo motor SG90 - Tiny servo motor to be used as the door lock.
Learn how to get started with Raspberry PI here. You will need to connect the RFID module as it's explained here.
The code is having two main applications:
- CaldyVault API - The API
The WEB API that will accept web requests in order to grant candies to the developers. It uses the Python Flask Microframework and the pymysql Python library.
- CandyVault Keeper - The Keeper
The tool in charge of opening the vault door. It will check if the card used is having a candy available. This script will be in charge of controlling the servo motor, it will also check a conductivity sensor in order to determinate if the door has been illegally opened.
- Create the MySQL database, schema is used at the MySQL helper script.
- Update the MySQL database name, user name and password at the MySQL helper script file.
- The addusers.py will help you to read RFID cards and store them as users at the MySQL DB.
- Create a new "secret_key" for the Flask API application. Check the Flask documentation for more help.
- Customize the pins used by the RFID module and the conductivity sensor at the MFRC522.py and candyvaultkeeper.py files.