Do you use a paper based tally sheet to count your team's coffee consumption? Throw it away and use coffeebuddy
!
- Optional: Create virtual environment
If
python3 -m venv .env . .env/bin/activate pip install -r requirements.txt
pyscard
fails building you might need to install dependencies. For Debian based distributions this would besudo apt install swig libpcsclite-dev
- Connect a pcsc smart card reader. I use a uTrust 4701f. Drivers for Ubuntu can be installed for example by
sudo apt install pcscd pcsc-tools
- Start
production
environmentor./bin/run.py
development
environmentFLASK_ENV=development ./bin/run.py
Run tests with python -m unittest test/test_app.py
The final application uses a Raspberry Pi attached to a 7" touchscreen. Thus, the HTML an CSS is optimized for a display with a resolution of 1024x600.
At least I had to adjust the following settings:
- Fix screen resolution
hdmi_group=2 hdmi_mode=87 hdmi_cvt 1024 600 60 3 0 0 1 hdmi_drive=2
- If display has to be rotated by 180° adjust
/etc/X11/xorg.conf.d/40-libinput.conf
Section "InputClass" Identifier "libinput touchscreen catchall" MatchIsTouchscreen "on" MatchDevicePath "/dev/input/event*" Driver "libinput" Option "CalibrationMatrix" "-1 0 1 0 -1 1 0 0 1" EndSection
- Disable translation option in chrome
Coffeebuddy works with PCSC reader and with SPI RFID module "RC522". Latter is supported on Raspi by several python modules. Although mrfc522 is widely used it leads to a high CPU consumption when polling for card. pi-rc522 uses interrupt based SPI communication.
Both modules can be used and selected in config.py.