Comments (5)
Thanks for the finding. I have corrected and just uploaded the new version 1.4.16. let me know
from sps30.
Thanks!
from sps30.
Hi again,
I bought new SPS30 sensors for tests, when these arrived I did some extra tests with my old UART setup using only ESP32 boards, and I found that this validation (#if Serial2
) doesn't works for them. Validate with Serial2
only works for ESP32C3, and for this reason we close this issue. But the right way to validate the Serial2 interface in the both architectures is using:
#if SOC_UART_NUM > 2
for the ESP32, because it resolve 3. For the ESP32-C3 resolve 2.
In my library I have a similar block:
case SERIALPORT2:
#if SOC_UART_NUM > 2
DEBUG("-->[SLIB] UART COMM port \t: Serial2");
if (pms_type == SENSORS::SSPS30)
Serial2.begin(speed_baud);
else
Serial2.begin(speed_baud, SERIAL_8N1, pms_rx, pms_tx, false);
_serial = &Serial2;
break;
#else
DEBUG("-->[SLIB] Force UART port \t: Serial1");
Serial1.begin(speed_baud, SERIAL_8N1, pms_rx, pms_tx);
_serial = &Serial1;
#endif
from sps30.
Don't understand the issue. I use (#ifdef Serial2
) not (if Serial2
). If there is no Serial2 defined, I can not use it.
In the sketch the right Serial port to use should be provided. As indicated in the Readme, I kept the "old" structure in for backward compatibility. For future implementation with serial, I would rather see that example12 setup for serial communication is used.
Much easier :-)
from sps30.
Sorry, I did a mistake, I want to say ifdef
. In my previous version I was using your similar workaround (ifdef Serial2):
but it working with C3, but with ESP32 and Espressif 4.4.0 for example, this validation doesn't works.
from sps30.
Related Issues (20)
- Example 6 SPS30 HOT 1
- SPS_DEBUGSERIAL_SODAQ Error HOT 2
- Please support NANO 33 IOT board. HOT 1
- Setting up serialport2 TX and RX HOT 5
- I2C Wake-up does not work HOT 1
- ByteToFloat HOT 2
- Hard reset? HOT 13
- CRC error when reading version info HOT 4
- Further check possible when reading values; avoids bad data HOT 1
- Replacement Connector Found! HOT 5
- PM1.0 measure over i2c sometimes give 0 HOT 4
- i2c speed recommendation HOT 2
- SPS not running Uart HOT 34
- Example5_sps30_bme280_BasicReadings HOT 1
- Compile error when excluding UART HOT 6
- Error reading sps30. HOT 4
- Example scd30 sps30 basic reading not compiling HOT 2
- ERR_OK and ERR_TIMEOUT overwrite framework definitions HOT 6
- 'ERR_DATALENGTH' 'ERR_OK' not declared HOT 8
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from sps30.