Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Esp32c3test #160

Merged
merged 22 commits into from
Jan 29, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
22 commits
Select commit Hold shift + click to select a range
4105607
added directive for disable serial2 on C3 (untested)
hpsaturn Jul 29, 2022
6ba82c4
Merge branch 'master' of github.com:kike-canaries/canairio_sensorlib …
hpsaturn Nov 14, 2022
7453598
added testing section for this device
hpsaturn Jan 21, 2023
8252057
fixed issue for esp32c3
hpsaturn Jan 26, 2023
442523c
Merge branch 'master' of github.com:kike-canaries/canairio_sensorlib …
hpsaturn Jan 26, 2023
40f35e1
revert original serial2 condition
hpsaturn Jan 26, 2023
a0be90c
Merge branch 'sps30_esp32c3' into esp32c3test
hpsaturn Jan 26, 2023
07d8b11
successful test over M5Stamp C3 board (init without crash)
hpsaturn Jan 26, 2023
1ed3c1a
changed I2C Wire1 validation only cheking the Wire1 define
hpsaturn Jan 27, 2023
32ccdf0
deprecated DHT11 sensor (it crashes ESP32C3 core)
hpsaturn Jan 27, 2023
345b0d0
fixed possible case error in esp32c3
hpsaturn Jan 27, 2023
1a14be0
test sps30 by i2c
roberbike Jan 28, 2023
1dad785
Update Sensors.cpp
roberbike Jan 28, 2023
695e516
test sps30
roberbike Jan 28, 2023
e2a4e30
Merge branch 'esp32c3test' of https://github.com/roberbike/canairio_s…
roberbike Jan 28, 2023
97109d3
added table of platforms supported
hpsaturn Jan 28, 2023
39f3e27
v0.6.4 esp32c3/s3 initial support and some improvements
hpsaturn Jan 28, 2023
82c015c
improved documentation and fix some typo issues for release
hpsaturn Jan 28, 2023
daa5965
fixed missing version of sps30 library on examples for CI
hpsaturn Jan 28, 2023
c58326e
correccion
roberbike Jan 28, 2023
058e79f
Merge pull request #161 from roberbike/esp32c3test
hpsaturn Jan 29, 2023
fd3e285
fixed some issues on deprecation DHT11 methods and library
hpsaturn Jan 29, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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