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-30Lines changed: 19 additions & 30 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 |
65
-
| ESP32S3 | LilyGo TDisplay | In testing |UNSTABLE|
66
-
| ESP32C3 | Devkit v3 | In testing |UNSTABLE|
65
+
| ESP32S3 | LilyGo TDisplay | In testing |STABLE|
66
+
| ESP32C3 | Devkit v3 | In testing |STABLE|
67
67
| ESP8266 | 12 | D1MINI tested and similar (old) | STABLE |
68
68
| Atmelsam | seeed_wio_terminal | Only works via i2c on left port | STABLE |
69
69
| Arduino | Atmel | Some third party libraries fails | IN PROGRESS |
@@ -74,9 +74,9 @@ NOTE: DHT22 is supported but is not recommended. Please see the documentation.
74
74
75
75
- Unified variables and getters for all sensors
76
76
- Auto UART port selection (Hw, Sw, UART1, UART2, etc)
77
-
- Multiple i2c reads and one UART sensor read support
77
+
- Multiple i2c sensors and one UART sensor supported at the same time
78
78
- Two I2C channel supported (Wire and Wire1)
79
-
- Real time registry of sensors unit registered (see multivariable)
79
+
- Real time registry of sensor units (see multivariable)
80
80
- Get vendor names of all devices detected
81
81
- Preselected main stream UART pins from popular boards
82
82
- Auto config UART port for Plantower, Honeywell and Panasonic sensors
@@ -87,9 +87,8 @@ NOTE: DHT22 is supported but is not recommended. Please see the documentation.
87
87
- Get unit symbol and name and each sub-sensor
88
88
- Get the main group type: NONE, PM, CO2 and ENV.
89
89
- Basic debug mode support toggle in execution
90
-
- Basic power saving management with sample time > 30s on SPS30
91
90
92
-
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)
93
92
94
93
# Quick implementation
95
94
@@ -172,7 +171,6 @@ In this [demo](https://www.youtube.com/watch?v=uxlmP905-FE) on a simple sketch y
172
171
173
172
[](https://youtu.be/i15iEF47CbY)
174
173
175
-
176
174
## Multivariable alternative implementation
177
175
178
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:
@@ -233,16 +231,14 @@ void setup() {
233
231
voidloop() {
234
232
sensors.loop(); // read sensor data and showed it
235
233
}
236
-
```
237
-
234
+
```
238
235
239
-
## UART detection demo
236
+
## UART detection demo
240
237
241
238
[](https://www.youtube.com/watch?v=hmukAmG5Eec)
242
239
243
240
CanAirIO sensorlib auto configuration demo on [Youtube](https://www.youtube.com/watch?v=hmukAmG5Eec)
244
241
245
-
246
242
# Wiring
247
243
248
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:
@@ -253,20 +249,20 @@ The current version of library supports 3 kinds of wiring connection, UART, i2c
253
249
254
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.
268
264
269
-
### Custom UART:
265
+
### Custom UART
270
266
271
267
Also you could define a custom UART pins in the init() method and select specific sensors model, like this:
272
268
@@ -282,27 +278,22 @@ We are using the default pins for each board, some times it's pins are 21,22, pl
282
278
283
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).
284
280
285
-
286
281
# Examples
287
282
288
283
### PlatformIO (recommended)
289
284
290
-
#### Compiling and Installing
291
-
292
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:
293
286
294
287
```python
295
-
pio run --target upload
288
+
pio run -e esp32 --target upload
296
289
```
297
290
298
291
### Arduino IDE
299
292
300
-
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)
301
294
302
295
### Arduino CLI
303
296
304
-
#### Prerequisites
305
-
306
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.
307
298
308
299
Also you need to add the **alternative links** for supporting the ESP32 boards:
0 commit comments