You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+19-28Lines changed: 19 additions & 28 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -3,7 +3,7 @@
3
3
4
4
# Air Quality Sensors Library
5
5
6
-
Generic sensor manager, abstractions and bindings of multiple sensors [libraries](https://github.com/kike-canaries/canairio_sensorlib/blob/master/platformio.ini#L18-L34): Honeywell, Plantower, Panasonic, Sensirion, etc. and CO2 sensors. Also it's handling others environment sensors. This library is for general purpose, but also is the sensors library base of [CanAirIO project](https://canair.io/docs).
6
+
Generic sensor manager, abstractions and bindings of multiple sensors [libraries](https://github.com/kike-canaries/canairio_sensorlib/blob/master/unified-lib-deps.ini): Honeywell, Plantower, Panasonic, Sensirion, etc. and CO2 sensors. Also it's handling others environment sensors. This library is for general purpose, but also is the sensors library base of [CanAirIO project](https://canair.io/docs).
7
7
8
8
For developers also you can check the complete library documentation [here](http://hpsaturn.com/canairio_sensorlib_doc/html/index.html)
9
9
@@ -25,7 +25,7 @@ For developers also you can check the complete library documentation [here](http
| ESP32 | WROVER*| ESP32Devkit and similar (recommended) | STABLE |
63
-
| ESP32S3 | LilyGo TDisplay | In testing |UNSTABLE|
64
-
| ESP32C3 | Devkit v3 | In testing |UNSTABLE|
65
+
| ESP32S3 | LilyGo TDisplay | In testing |STABLE|
66
+
| ESP32C3 | Devkit v3 | In testing |STABLE|
65
67
| ESP8266 | 12 | D1MINI tested and similar (old) | STABLE |
66
68
| Atmelsam | seeed_wio_terminal | Only works via i2c on left port | STABLE |
67
69
| Arduino | Atmel | Some third party libraries fails | IN PROGRESS |
@@ -72,9 +74,9 @@ NOTE: DHT22 is supported but is not recommended. Please see the documentation.
72
74
73
75
- Unified variables and getters for all sensors
74
76
- Auto UART port selection (Hw, Sw, UART1, UART2, etc)
75
-
- Multiple i2c reads and one UART sensor read support
77
+
- Multiple i2c sensors and one UART sensor supported at the same time
76
78
- Two I2C channel supported (Wire and Wire1)
77
-
- Real time registry of sensors unit registered (see multivariable)
79
+
- Real time registry of sensor units (see multivariable)
78
80
- Get vendor names of all devices detected
79
81
- Preselected main stream UART pins from popular boards
80
82
- Auto config UART port for Plantower, Honeywell and Panasonic sensors
@@ -85,9 +87,8 @@ NOTE: DHT22 is supported but is not recommended. Please see the documentation.
85
87
- Get unit symbol and name and each sub-sensor
86
88
- Get the main group type: NONE, PM, CO2 and ENV.
87
89
- Basic debug mode support toggle in execution
88
-
- Basic power saving management with sample time > 30s on SPS30
89
90
90
-
Full list of all sub libraries supported [here](https://github.com/kike-canaries/canairio_sensorlib/blob/master/library.json#L72-L89)
91
+
Full list of all sub libraries supported [here](https://github.com/kike-canaries/canairio_sensorlib/blob/master/unified-lib-deps.ini)
91
92
92
93
# Quick implementation
93
94
@@ -170,7 +171,6 @@ In this [demo](https://www.youtube.com/watch?v=uxlmP905-FE) on a simple sketch y
170
171
171
172
[](https://youtu.be/i15iEF47CbY)
172
173
173
-
174
174
## Multivariable alternative implementation
175
175
176
176
The last version added new getters to have the current status of each unit of each sensor connected to the device in real time. Also you can retrieve the list of device names and other stuff:
@@ -231,16 +231,14 @@ void setup() {
231
231
voidloop() {
232
232
sensors.loop(); // read sensor data and showed it
233
233
}
234
-
```
235
-
234
+
```
236
235
237
-
## UART detection demo
236
+
## UART detection demo
238
237
239
238
[](https://www.youtube.com/watch?v=hmukAmG5Eec)
240
239
241
240
CanAirIO sensorlib auto configuration demo on [Youtube](https://www.youtube.com/watch?v=hmukAmG5Eec)
242
241
243
-
244
242
# Wiring
245
243
246
244
The current version of library supports 3 kinds of wiring connection, UART, i2c and TwoWire, in the main boards the library using the defaults pins of each board, but in some special cases the pins are:
@@ -251,20 +249,20 @@ The current version of library supports 3 kinds of wiring connection, UART, i2c
251
249
252
250
The library has [pre-defined some UART pin configs](https://github.com/kike-canaries/canairio_sensorlib/blob/master/src/Sensors.hpp#L19-L52), these are selected on compiling time. Maybe you don't need change anything with your board, and maybe the nexts alternatives works for you:
** This pines are when you compile your project without specific any build variable or you board isn't in the list.
266
264
267
-
### Custom UART:
265
+
### Custom UART
268
266
269
267
Also you could define a custom UART pins in the init() method and select specific sensors model, like this:
270
268
@@ -280,27 +278,22 @@ We are using the default pins for each board, some times it's pins are 21,22, pl
280
278
281
279
For now we are using it only for DHT sensors in PIN 23. For more info please review the next lines [here](https://github.com/kike-canaries/canairio_sensorlib/blob/master/src/Sensors.hpp#L19-L52).
282
280
283
-
284
281
# Examples
285
282
286
283
### PlatformIO (recommended)
287
284
288
-
#### Compiling and Installing
289
-
290
285
We recommended PlatformIO because is more easy than Arduino IDE. For this, please install first [PlatformIO](http://platformio.org/) and its command line tools (Windows, MacOs and Linux), **pio** command, then connect your compatible board to the USB and run the next command:
291
286
292
287
```python
293
-
pio run --target upload
288
+
pio run -e esp32 --target upload
294
289
```
295
290
296
291
### Arduino IDE
297
292
298
-
Only import the `ino` file of the sample and install the libraries listed on `library.json` and this library.
293
+
Only import the `ino` file of the sample and install the libraries listed on `library.json` and this library. Complete list of libraries used [here](https://github.com/kike-canaries/canairio_sensorlib/blob/master/unified-lib-deps.ini)
299
294
300
295
### Arduino CLI
301
296
302
-
#### Prerequisites
303
-
304
297
For run the examples, you first need to install **arduino-cli** or the **Arduino IDE** with the libraries referenced in **lib_deps** on the file [platformio.ini](https://github.com/kike-canaries/canairio_sensorlib/blob/master/platformio.ini), becuase **Arduino don't install it automatically** like PlatformIO. Then put CanAirIO sensor library in your library directory, you can download it from [releases](https://github.com/kike-canaries/canairio_sensorlib/releases) section.
305
298
306
299
Also you need to add the **alternative links** for supporting the ESP32 boards:
sentence=Air quality particle meter and CO2 sensors manager for multiple models.
7
7
paragraph=Generic sensor manager, abstratctions and bindings of multiple air sensors libraries: Honeywell, Plantower, Panasonic, Sensirion, Nova, etc. and CO2 sensors. Also it handling others environment sensors. This library is for general purpose but also is the sensors library base of CanAirIO project.
0 commit comments