Version 1.0
External buttons connected to GND and board pins:
Pin 2 - [INC], [+] increment button
Pin 27 - [DEC], [-] decrement button
Pin 12 - [Audio], [Pause] button
Build in buttons:
Pin 0 - [NXT] next mode button
Pin 35 - [PRV] previous mode button
VL53L0X module for prostrations counter connected:
SCL to pin 22 of board
SDA to pin 21 of board
Micro audio speaker (10mm) connected to:
Pin 25 and GND
[INC] - increase current counter
[DEC] - decrease current counter
[DEC] long press - reset current counter
[NXT] - next counter mode
[PRV] - previous counter mode
[Audio] - Sound ON/OFF and Pause/Count in prostartions counter mode
[NXT] long press or [PRV] long press - Configuration menu
The menu has minimal functionality. Most of the configuration is carried out through the web server in AP mode.
[NXT] - next menu element
[PRV] - previous menu element
[INC] - select/increase value
[DEC] - decrease value
Web server in AP (Access Point) mode. After connecting to the Access Point via WiFi, use the IP address in the browser to open the configuration page.
Buttons:
[INC] - show QR code for server IP
[DEC] - exit from AP mode
A distance sensor VL53L0X is used for auto counting.
Counting logic:
If the distance is less than specified (70 cm) during a certain time, then this is defined as a prostration.
After the distance has become more than specified (70 cm) for a certain time, it is defined as the beginning of a new prostration.
The application is compiled in the Arduino IDE.
The application size is about 1.8 Mb, so use partition scheme with 2 Mb or more for APP.
All files from \data folder, must be uploaded to the SPIFFS.
For that purpose you can use this tool: https://github.com/me-no-dev/arduino-esp32fs-plugin
Or this tool: https://github.com/dsiberia9s/DESKTOP_A-Explorer_File_Browser_via_Serial
Used external libraries:
Battery level: Pangodream_18650_CL - https://www.pangodream.es/esp32-getting-battery-charging-level
Audio library: XT_DAC_Audio - https://www.xtronical.com/the-dacaudio-library-download-and-installation
VL53L0X Distance Sensor: Adafruit_VL53L0X - https://github.com/adafruit/Adafruit_VL53L0X
Buttons: EasyButton - https://easybtn.earias.me/ , https://github.com/evert-arias/EasyButton
JSON configuration files: ArduinoJson - https://arduinojson.org/ , https://github.com/bblanchon/ArduinoJson
Web Server:
AsyncTCP - https://github.com/me-no-dev/AsyncTCP
ESPAsyncWebServer - https://github.com/me-no-dev/ESPAsyncWebServer
QR Code - https://github.com/ricmoo/qrcode/