Git submodules contain supported device, board-schematic, mock emulator codebase
We submit our solution in GDSC Solution challenge 2022 base on 17 Sustainable Development Goals of the United Nations more info could be found here
Youtube : https://www.youtube.com/watch?v=W5LBuIvWCd8
- Platform IO as our IDE of chose for IoT development Platform IO - VScode Install
- Follow this guidance (GUI click-click) to add ESP32 build-tool for PlatformIO here
- Wait a bit for ESP32 build-tool to be install in PlatformIO (1.2 GB)
- ESP32-BLE/ - Folder contain Platform IO project
- Change PlatformIO USB PORT base on linux/macos , window file-path
- Platform IO Build with ESP32 board of your choice
if you don't have required sensor to run the project
follow here to enable emulator suite for mockup BLE data over serial
# minimal step for techie 👨🏻💻
1. install Platform IO
2. cd ESP32-BLE/
3. install esp32 build-tool for Platform IO (follow GUI click-click)
4. change usb-port (linux/macos [/dev/ttyUSB], window [COM])
5. Build
Part could be order (cheaply) - here are direct link for visual aspect
- Radar motion Sensor : RCWL-0516
- RFID/NFC : PN532.
- Contact-less Infrared Sensor : MLX90614
- Cheap proximity sensor : UNKNOWN support MLX90614 reading in close range
- 3D-MODEL/
- box-pn532.stl"
- esp32-ttgo-box.STL"
- motion-dection-box.STL"
- thermal-and-proximity-box.STL"
work in process
Flutter application as an testing suite for IoT BLE is hard-complex to develop "within our develop resource and time"
I suggest using [LightBlue® — Bluetooth Low Energy] IOS | Android [Window,Mac] also avablie if your machine has BLE
We're using a custom BLE GATT profile which means the UUID will be hard to look at but you guys can base on our documentation here where we define our BLE GATT services, characteristics.
gatt_profile:
- BLE_SERVICE_THERMOMETER_UUID: "00000B00-5226-4AE0-8977-656FD3C42DA2"
When you get familiar with LightBlue, you will be able to know that every time the BLE board notify LightBlue will get it. But the format is kind of a mess so you have to **decode **it I suggest using a tool on the website http://www.unit-conversion.info/texttools/ascii/ to decode and see the value has been transfer over BLE protocol
BLE GATT:
BLE_SERVICE_THERMOMETER_UUID: "00000B00-5226-4AE0-8977-656FD3C42DA2"
data:
051 051 (ascii) => String: => 33 (ascii decode to text)
meaning: Data from THERMOMETER is 33
What I would do when i don't have sensor to connect to BLE Board
You will use BLE_SENSOR_EMULATOR in short it allows your machine (PC) talk to BLE Board (ESP32) over serial and send data over BLE GATT. BLE_SENSOR_EMULATOR are located here is a Python script with serial comunication
step to use
- Config your
machine PORT
in the Python script here Config DEBUG MODE
in C++ project located here
#ifndef DEVICE_CONFIG_H
#define DEVICE_CONFIG_H
/// BLE SERIAL EMULATOR
/// uncomment as enable BLE SERIAL EMULATOR MODE
#define DEBUG
/// SENSOR DATA LOG
#define DEBUG_DATA_LOG
#endif
- base on while loop it will call BLE Board to send each package, you could re-configure to your liking
=> if you still on LightBLue you will see the data been notify
sequenceDiagram
participant IoT
participant Mobile
rect rgb(100, 159, 100)
IoT->>Mobile:devlopemnt_enviorment
alt is_ble
Note over IoT,Mobile:real hardware mobile
else
Note over IoT,Mobile:mobile emulator for UI
end
end