diff --git a/README.md b/README.md index 7fad88a..711a71d 100644 --- a/README.md +++ b/README.md @@ -1,2 +1,40 @@ # Temperature Alarm +![Picture of the BeagleBone](docs/img/beaglebone_small.jpg) + +![Screenshot of the dashboard](docs/img/dashboard_small.png) + +## Setup + +In the `backend` folder, copy `appsettings.example.json` into `appsettings.json` and fill out the values. + +In the `frontend` folder, copy `shared/constants.example.js` into `shared/constants.js` and fill out the values. + +In the `iot` folder, copy `config.example.h` into `config.h` and fill out the values. + +## Running + +To run the backend, type `dotnet run` within the `backend/Api` folder. Make sure you have the .NET 8 SDK installed. + +The frontend should just be hosted with a static web server. To run locally, you may e.g. use PHP: `php -S 0.0.0.0:80` + +The IoT code should be run on a BeagleBone Black with: + +- A Grove Base Cape, set to 5V +- A JHD1313 Grove-LCD RGB Backlight display in one of the I2C\_2 ports +- An MCP9808 Grove High Accuracy Temperature Sensor in one of the I2C\_2 ports +- A Grove Buzzer in the GPIO\_51 port + +The following library packages are required by the IoT code and should be installed on the BeagleBone: + +`apt install libmosquitto-dev librabbitmq-dev libi2c-dev libgpiod-dev libcjson-dev` + +> [!NOTE] +> The RabbitMQ apt package is missing the header files - They can be copied from [here](https://github.com/alanxz/rabbitmq-c/tree/master/include/rabbitmq-c) into the `/usr/include/rabbitmq-c` folder + +Copy the source files onto the BeagleBone and run the following command to compile and run the code: + +`make && ./a.out` + +To run in the background, a program such as GNU Screen can be used. + diff --git a/docs/img/beaglebone.jpg b/docs/img/beaglebone.jpg new file mode 100644 index 0000000..3ed5005 Binary files /dev/null and b/docs/img/beaglebone.jpg differ diff --git a/docs/img/beaglebone_small.jpg b/docs/img/beaglebone_small.jpg new file mode 100644 index 0000000..530eace Binary files /dev/null and b/docs/img/beaglebone_small.jpg differ diff --git a/docs/img/dashboard.png b/docs/img/dashboard.png new file mode 100644 index 0000000..5d1f242 Binary files /dev/null and b/docs/img/dashboard.png differ diff --git a/docs/img/dashboard_small.png b/docs/img/dashboard_small.png new file mode 100644 index 0000000..5f0d6d5 Binary files /dev/null and b/docs/img/dashboard_small.png differ