This is the final project for the subject Sistemas Distribuidos y Empotrados.
This project implements a mailbox where packages can be received, without the receiver being at home.
To do this, the postman can request the user to open the mailbox by pressing a button, and the user can open it remotely with their mobile phone. In addition, if the receiver is not available, he can provide an access code to the postman, to enter it and open the mailbox door. Thus, it detects when you have ordinary mail and it notifies you to the mobile phone.
The hardware used in the project will be the following:
- ESP32 Nodemcu
- Display OLED 1'3 pulgadas I2C
- Electric lock DC 5V
- Arduino Keypad 4x4
- Rele 5V
- Ultrasonic sensor
- Arduino switch
Android APP available in: https://github.com/cristiantrapero/SmartMailbox-Android
ESP32 Libraries:
- Bluetooth Low Energy (BLE) Library: https://github.com/h2zero/NimBLE-Arduino
- Keypad Library: https://playground.arduino.cc/Code/Keypad/
- LCD Screen U8g2: https://github.com/olikraus/u8g2/
- MQTT Arduino: https://github.com/knolleary/pubsubclient
- Open the project in VSCode with PlatformIO
- Connect ESP32 to PC
- Change WIFI_SSID and WIFI_PASSWORD
- Change MQTT configuration parameters
- Build and upload the code to the ESP32
- Just enjoy!
- Deploy a MQTT server on a public server
- Modify the MQTT configuration parameters in the project
- Load the project in a ESP32
- Install Android App
- Control the mailbox with the Android app
- Add LCD screen messages
- User EEPROM in pin code and WiFi parameters
- Disable BLE advertising when is connected to a smarphone
- Encrypt comunications
- ESP32 Bluetooth Low Energy: https://randomnerdtutorials.com/esp32-bluetooth-low-energy-ble-arduino-ide/
- ESP32 Servidor BLE: https://www.prometec.net/esp32-servidor-ble/
- Migrating from Bluedroid to NimBLE: https://h2zero.github.io/esp-nimble-cpp/md_docs__migration_guide.html