Skip to content

Commit

Permalink
Merge pull request #160 from kike-canaries/esp32c3test
Browse files Browse the repository at this point in the history
Esp32c3test
  • Loading branch information
hpsaturn authored Jan 29, 2023
2 parents 9d43f46 + fd3e285 commit 50739e9
Show file tree
Hide file tree
Showing 9 changed files with 127 additions and 78 deletions.
38 changes: 19 additions & 19 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -51,9 +51,22 @@ NOTE: Panasonic via UART in ESP8266 maybe needs select in detection
| BME280 | i2c | Auto | STABLE |
| BMP280 | i2c | Auto | TESTING |
| BME680 | i2c | Auto | STABLE |
| DHTxx | TwoWire | Auto | DEPRECATED |
| DHTxx | TwoWire | Auto | DISABLED |

NOTE: DHT22 is supported but is not recommended. Please see the documentation.

### Platforms supported

| Platform | Variants | Notes | Status |
|:----------------------- |:-----:|:-------:|:----------:|
| ESP32 | WROVER* | ESP32Devkit and similar (recommended) | STABLE |
| ESP32S3 | LilyGo TDisplay | In testing | UNSTABLE |
| ESP32C3 | Devkit v3 | In testing | UNSTABLE |
| ESP8266 | 12 | D1MINI tested and similar (old) | STABLE |
| Atmelsam | seeed_wio_terminal | Only works via i2c on left port | STABLE |
| Arduino | Atmel | Some third party libraries fails | IN PROGRESS |


NOTE: DHT22 is supported but is not recommended

# Features

Expand Down Expand Up @@ -129,7 +142,7 @@ void setup() {



// Also you can access to sub library objects, and perform for example calls like next:
// Also you can access to sub-library objects, and perform for example calls like next:

// sensors.sps30.sleep()
// sensors.bme.readPressure();
Expand All @@ -147,21 +160,8 @@ void loop() {
}
```

## Output

On your serial monitor you should have something like that:

```bash
-->[SETUP] Detecting sensors..
-->[SETUP] Sensor configured: SENSIRION
-->[MAIN] PM1.0: 002 PM2.5: 004 PM10: 006
-->[MAIN] PM1.0: 002 PM2.5: 002 PM10: 002
-->[MAIN] PM1.0: 002 PM2.5: 002 PM10: 002
```

## Multivariable demo


In this [demo](https://www.youtube.com/watch?v=-5Va47Bap48) on two different devices with multiple sensors, you can choose the possible sub sensors units or variables:

[![CanAirIO multivariable demo](https://img.youtube.com/vi/-5Va47Bap48/0.jpg)](https://www.youtube.com/watch?v=-5Va47Bap48)
Expand All @@ -171,7 +171,6 @@ In this [demo](https://www.youtube.com/watch?v=uxlmP905-FE) on a simple sketch y
[![CanAirIO Sensors Lib DEMO with M5CoreInk](https://img.youtube.com/vi/i15iEF47CbY/0.jpg)](https://youtu.be/i15iEF47CbY)



## Multivariable alternative implementation

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:
Expand Down Expand Up @@ -377,10 +376,11 @@ Also you can make a donation, be a patreon or buy a device:
# Projects using this Library

- [CanAirIO Device](https://github.com/kike-canaries/canairio_firmware): ESP32 Air quality device for mobile and fixed stations. (PM2.5 and CO2)
- [Medidor de CO2](https://emariete.com/medidor-co2-display-tft-color-ttgo-t-display-sensirion-scd30): Un medidor de CO2 de alta calidad con pantalla en color. (CO2)
- [Medidor de CO2](https://emariete.com/medidor-co2-display-tft-color-ttgo-t-display-sensirion-scd30): Un medidor de CO2 de alta calidad con pantalla en color. (CO2)
- [M5CoreInk Multi Sensor](https://github.com/hpsaturn/co2_m5coreink#readme): Wall CO2, T, H, P, Alt, sensor with low consumption (30 days)

# Credits

Thanks to all collaborators and [CanAirIO](https://canair.io) community for testing and reports.
Thanks to all collaborators and [CanAirIO](https://canair.io) community for testing and reports. Visit us on [Telegram](https://t.me/canairio)

---
2 changes: 1 addition & 1 deletion doxygen.conf
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ PROJECT_NAME = "CanAirIO Sensors Library"
# could be handy for archiving the generated documentation or if some version
# control system is used.

PROJECT_NUMBER = 0.6.1
PROJECT_NUMBER = 0.6.4

# Using the PROJECT_BRIEF tag one can provide an optional one line description
# for a project that appears at the top of each page and should give viewer a
Expand Down
6 changes: 3 additions & 3 deletions examples/advanced_multivariable/src/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -62,12 +62,12 @@ void setup() {
Serial.println("\n== Sensor test setup ==\n");
Serial.println("-->[SETUP] Detecting sensors..");

sensors.setSampleTime(5); // config sensors sample time interval
sensors.setSampleTime(10); // config sensors sample time interval
sensors.setOnDataCallBack(&onSensorDataOk); // all data read callback
sensors.setDebugMode(false); // [optional] debug mode
sensors.setDebugMode(true); // [optional] debug mode
sensors.detectI2COnly(false); // disable force to only i2c sensors
sensors.init(); // Auto detection to UART and i2c sensors
delay(500);
delay(1000);
}

void loop() {
Expand Down
2 changes: 1 addition & 1 deletion examples/advanced_sensirion/platformio.ini
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ lib_deps =
adafruit/Adafruit SCD30 @ 1.0.9
adafruit/Adafruit BusIO @ 1.14.1
robtillaart/AM232X @ 0.4.5
paulvha/sps30 @ 1.4.14
paulvha/sps30 @ 1.4.16
wifwaf/MH-Z19 @ 1.5.4
jcomas/S8_UART @ 1.0.1
sensirion/Sensirion Core @ 0.6.0
Expand Down
4 changes: 2 additions & 2 deletions library.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "CanAirIO Air Quality Sensors Library",
"version": "0.6.3",
"version": "0.6.4",
"homepage":"https://canair.io",
"keywords":
[
Expand Down Expand Up @@ -83,7 +83,7 @@
{"name":"Adafruit SCD30", "owner":"adafruit","version":"1.0.9"},
{"name":"Adafruit BusIO", "owner":"adafruit","version":"1.14.1"},
{"name":"AM232X", "owner":"robtillaart", "version":"0.4.5"},
{"name":"sps30", "owner":"paulvha","version":"1.4.14"},
{"name":"sps30", "owner":"paulvha","version":"1.4.16"},
{"name":"MH-Z19", "owner":"wifwaf", "version":"1.5.4"},
{"name":"S8_UART", "owner":"jcomas", "version":"1.0.1"},
{"name":"Sensirion Core","owner":"sensirion","version":"0.6.0"},
Expand Down
2 changes: 1 addition & 1 deletion library.properties
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name=CanAirIO Air Quality Sensors Library
version=0.6.3
version=0.6.4
author=@hpsaturn, CanAirIO project <[email protected]>
maintainer=Antonio Vanegas <[email protected]>
url=https://github.com/kike-canaries/canairio_sensorlib
Expand Down
32 changes: 30 additions & 2 deletions platformio.ini
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,9 @@ monitor_speed = 115200
monitor_filters = time
build_flags =
-D CORE_DEBUG_LEVEL=0
; -D DHT11_ENABLED=1 // Deprecated, please change this old sensor
; -D DHT_SENSOR_TYPE=2
; -D DHT_SENSOR_PIN=19
lib_deps =

adafruit/Adafruit Unified Sensor @ 1.1.7
Expand All @@ -24,7 +27,7 @@ lib_deps =
adafruit/Adafruit SCD30 @ 1.0.9
adafruit/Adafruit BusIO @ 1.14.1
robtillaart/AM232X @ 0.4.5
paulvha/sps30 @ 1.4.14
paulvha/sps30 @ 1.4.16
wifwaf/MH-Z19 @ 1.5.4
jcomas/S8_UART @ 1.0.1
sensirion/Sensirion Core @ 0.6.0
Expand All @@ -36,7 +39,7 @@ lib_deps =

[common]
framework = ${env.framework}
upload_speed = ${env.upload_speed}
; upload_speed = ${env.upload_speed}
monitor_speed = ${env.monitor_speed}
build_flags = ${env.build_flags}
lib_deps = ${env.lib_deps}
Expand Down Expand Up @@ -67,6 +70,31 @@ build_src_filter = -<*> +<advanced_multivariable/>
[env:esp32]
extends = esp32_common
build_src_filter = -<*> +<advanced_multivariable/>
build_flags =
${env.build_flags}
-D ESP32C3=1

[env:esp32c3]
extends = esp32_common
board = esp32-c3-devkitm-1
build_src_filter = -<*> +<advanced_multivariable/>

[env:esp32s3]
extends = esp32_common
platform = espressif32 @ 5.0.0
board = esp32-s3-devkitc-1
build_src_filter = -<*> +<advanced_multivariable/>
platform_packages = framework-arduinoespressif32@https://github.com/espressif/arduino-esp32.git#2.0.3
build_flags =
${env.build_flags}
-DBOARD_HAS_PSRAM
-DARDUINO_USB_MODE=1
-DARDUINO_USB_CDC_ON_BOOT=1

board_build.partitions = default_8MB.csv
board_build.arduino.memory_type = qspi_opi
board_build.flash_size = 8MB
board_build.psram_type = opi

[env:atmelsam]
extends = atmelsam_common
Expand Down
Loading

0 comments on commit 50739e9

Please sign in to comment.