Add documentation to readme
This commit is contained in:
parent
d25b72c3db
commit
6add0412c3
38
README.md
38
README.md
@ -1,2 +1,40 @@
|
|||||||
# Temperature Alarm
|
# Temperature Alarm
|
||||||
|
|
||||||
|

|
||||||
|
|
||||||
|

|
||||||
|
|
||||||
|
## 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.
|
||||||
|
|
||||||
|
BIN
docs/img/beaglebone.jpg
Normal file
BIN
docs/img/beaglebone.jpg
Normal file
Binary file not shown.
After Width: | Height: | Size: 498 KiB |
BIN
docs/img/beaglebone_small.jpg
Normal file
BIN
docs/img/beaglebone_small.jpg
Normal file
Binary file not shown.
After Width: | Height: | Size: 36 KiB |
BIN
docs/img/dashboard.png
Normal file
BIN
docs/img/dashboard.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 192 KiB |
BIN
docs/img/dashboard_small.png
Normal file
BIN
docs/img/dashboard_small.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 60 KiB |
Loading…
Reference in New Issue
Block a user