59 lines
1.3 KiB
Markdown
59 lines
1.3 KiB
Markdown
# TSM_PicoW_Sensor
|
|
Project using the PicoW board. It publish sensors values (humidity, temperature) to an MQTT broker.
|
|
|
|
## Configuration
|
|
|
|
You have to use the serial terminal (Baud rate of 115200) to configure the board by sending commands. The application will then store the parameters in flash memory. You have to restart the device to update the changes.
|
|
|
|
### Wifi
|
|
|
|
```shell
|
|
McuMinINI write settings.ini WiFi ssid "YOUR_SSID"
|
|
McuMinINI write settings.ini WiFi pass "YOUR_PASSWORD"
|
|
```
|
|
|
|
### MQTT
|
|
|
|
Broker informations:
|
|
```shell
|
|
McuMinINI write settings.ini MQTT broker "BROKER_NAME"
|
|
McuMinINI write settings.ini MQTT user "USERNAME"
|
|
McuMinINI write settings.ini MQTT pass "PASSWORD"
|
|
```
|
|
|
|
Topic names:
|
|
```shell
|
|
McuMinINI write settings.ini MQTT topic_sensor_update "<user>/<room>/<device>/update"
|
|
McuMinINI write settings.ini MQTT topic_send_measurement "<user>/<room>/<device>/cmd/measure"
|
|
```
|
|
|
|
## Build
|
|
Project has `Debug`, `Release` and `Test` targets, using CMake Presets.
|
|
|
|
Configure:
|
|
```
|
|
cmake --list-presets
|
|
cmake --preset Debug
|
|
cmake --preset Release
|
|
cmake --preset Test
|
|
```
|
|
|
|
Build:
|
|
```
|
|
cmake --build --list-presets
|
|
cmake --build --preset app-debug
|
|
cmake --build --preset app-release
|
|
cmake --build --preset app-test
|
|
```
|
|
|
|
Test:
|
|
```
|
|
ctest --list-presets
|
|
ctest --test-dir build/Test -R Led_1
|
|
```
|
|
|
|
Worflow:
|
|
```
|
|
cmake --workflow --list-presets
|
|
```
|