HumamShwaikh / espIoT

1 stars 1 forks source link

Data from Home

This is the codebase for a mesh network of IoT devices used to sense and report environmental data, made with ESP8266 and ESP32 microcontrollers, the PainlessMesh library, and various sensors to measure temperature, humidity, ambient noise, vibration, and whatever other data you want.

The nodes in the network are made up of these devices:

Authors

How to use - Raspberry Pi logger

The Raspberry Pi logger, (rpi_logger directory) runs continuously and stores messages received by the Pi (through the master node via serial connection) in a SQLite3 DB. To run it:

Then build it using the following command:

g++ -Wall main.cpp serialMonitor.cpp rs232.c -o a.out -std=c++11 -lsqlite3

Finally, run:

./a.out

How to flash code to one of the ESP nodes

All the nodes run one of the following .cpp files:

How to upload ONE of the .cpp files to a board in PlatformIO?

In platformio.ini, you have to use the src_filter option to exclude and include the files to be built and uploaded. For example, src_filter = +<logClient.cpp> -<logServer.cpp> will exclude logServer.cpp.

Attribution