create library and make two examples of usage

This commit is contained in:
Edward Emelianov
2025-10-14 00:17:07 +03:00
parent 7a37dc0d2f
commit ea0de3c904
20 changed files with 499 additions and 149 deletions

View File

@@ -0,0 +1,35 @@
# Examples of library usage
### logmany.c
Creates executable `log`. The purpose of this is to show how you can use library wit lots of sensors (even with fully similar)
divided by groups (to prevent same addresses on one bus) switching by PCA9548A.
Usage:
```
-H, --hlog=arg humidity logging file
-P, --plog=arg pressure logging file
-T, --tlog=arg temperature logging file
-a, --muladdr=arg multiplexer I2C address
-d, --device=arg I2C device path
-h, --help show this help
-i, --interval=arg logging interval, seconds (default: 10)
-m, --presmm pressure in mmHg instead of hPa
```
### single_sensor.c
Creates executable `single`. Open single sensor and show its parameters.
Usage:
```
-H, --heater=arg turn on/off heater (if present)
-a, --address=arg sensor's address (if not default)
-d, --device=arg I2C device path
-h, --help show this help
-l, --list list all supported sensors
-m, --presmm pressure in mmHg instead of hPa
-s, --sensor=arg sensor's name
```