This project is an assignment for Samsung Innovation Campus Batch 6 (SIC 6)
Developed with ❤️ by The Hash Slinging Slasher Team at
Table of Contents
https://stem.ubidots.com/app/dashboards/public/dashboard/jF07t8gcQSrJqPXWmpCxxpuVLqKNBSLNvRhIn_x-I8A
This project is an assignment for the Samsung Innovation Campus (SIC) Batch 6 created by the team UNI022 - The Hash Slinging Slasher. This project is an IoT project that connects microcontroller devices with the Ubidots platform. It utilizes the ESP32 connected to several sensors, including the ESP32 CAM, to transmit live video feeds in real-time to the Ubidots dashboard.
This IoT system also integrates several communication protocols simultaneously, such as MQTT to connect with the Ubidots platform and the HTTP protocol to connect to the Rest API created with Python Flask. In addition to sending data to Ubidots, the microcontroller also sends data to the Rest API for data logging, which is then stored in the MongoDB database.
/docs # Contains project documentation
└── ....
/esp32 # Contains ESP32 micropython source code
├── lib/ # External libraries
├── boot.py
└── main.py
/esp32cam # Contains ESP32CAM micropython source code
├── lib/ # External libraries
├── boot.py
└── main.py
/flask_server # Contains Flask Server source code
├── templates/ # Contains HTML Pages for sic6.tribone.my.id
├── server_forwarder.py # Obsolete forwarder server for ESPCAM (not used)
└── server.py # Main source code for Flask Server
Accessible via https://sic6.tribone.my.id
Accessible via https://stem.ubidots.com/app/dashboards/public/dashboard/jF07t8gcQSrJqPXWmpCxxpuVLqKNBSLNvRhIn_x-I8A
http://sic6.tribone.my.idPOST http://sic6.tribone.my.id/uploadReceives a base64-encoded image from an ESP32-CAM and saves it as esp32cam.jpg.
{
"image": "/9j/4AAQSkZJRgABAQEAAAAAAAD..."
}Success (200)
{
"message": "Gambar diterima!"
}
Error (400)
{
"error": "No image received"
}
POST http://sic6.tribone.my.id/insert_data_oneInserts a single data into MongoDB
{
"data_sensor": {
"location": {
"value": var,
"context": {
"lat": lat,
"lng": lon
}
},
"satellite": {
"value": sat
},
"altitude": {
"value": alt
},
"temperature": {
"value": temp
},
"humidity": {
"value": hum
},
"distance": {
"value": dist
}
}
}
Success (200)
{
"message": "Data berhasil dimasukkan ke database",
"inserted_id": "...."
}
Error (400)
{
"error": "Invalid JSON format"
}POST http://sic6.tribone.my.id/insert_data_manyInserts multiple data into MongoDB
{
"data_sensor_1": {
......
},
"data_sensor_2": {
......
},
...
}
Success (200)
{
"message": "Data berhasil dimasukkan ke database"
}
Error (400)
{
"error": "Invalid JSON format"
}GET http://sic6.tribone.my.id/delete_all_dataDeletes all data from MongoDB Collection
Success (200)
{
"message": "Data berhasil dihapus"
}
| GPS NEO 6M | ESP32 |
|---|---|
| VCC | 3.3V |
| RX | TX2 (GPIO 17) |
| TX | RX2 (GPIO 16) |
| GND | GND |
| HC-SR04 | ESP32 |
|---|---|
| VCC | VIN |
| TRIG | GPIO 5 |
| ECHO | GPIO 18 |
| GND | GND |
| DHT22 | ESP32 |
|---|---|
| VCC | 3.3V |
| OUT | GPIO 15 |
| GND | GND |
| OLED | ESP32 |
|---|---|
| Vin | 3.3V |
| SCL | GPIO 22 |
| SDA | GPIO 21 |
| GND | GND |
| LED Indicator | ESP32 |
|---|---|
| + | GPIO 27 |
| - | GND |



