Arduspresso is a smart way for tracking who consumes coffee in an office. Instead of using a volatile piece of paper, you can just mark a coffee on your account by simply scanning your fingerprint, and the information will be stored on a local db. A blinking led and a message on Telegram will also notify you about the track you left.
For this project I used a raspberry pi Zero, an arduino Nano, and a fingerprint sensor . A NodeJS script is running on a Pi Zero, waiting for messages coming from arduino. The script is in charge of performing all the db operations and runs a Telegram bot used for the communication with the user. The arduino simply runs a sketch for capturing fingerprints from the sensor, sending them back to the Pi.
Clone the repository:
$ git clone git@github.com:lukesmolo/Arduspresso.git
Link all the wires to the arduino pins, following this guide. Compile the sketch and upload it on arduino.
Create a new Telegram Bot and put your Telegram token inside the index.js script. Since users are identified by the Telegram username inside the db, you MUST check that your Telegram username is properly set. Put also your mongodb url, install all required modules and start the NodeJS script on Pi.
npm install
node index.js
There are 4 commands in the bot:
- /add_user: create a new user following the instructions and enroll his first fingerpint
- /recharge: recharge your account with a number of coffee
- /new_fingerprint: enroll a new fingerprint for the user
- /my_credit: get your credit
Arduspresso is released under the MIT License.