I’m working on Xensive PAS CO2 with Fire Beetle ESP 32 on PlatformIO to get the data from PAS CO2. but there is some issue with the library.
Same code and library when i process on ArduinoIDE works, but when i go for PlatformIO i didn’t works.
Even the examples that are included in the library didn’t works.
Please provide more details.
- Which exact library? (link)
- What issues do you expirience (“some issues” isn’t clear enough)
- Version used for
- the library in ArduinoIDE
- the library in PlatformIO
- Arduino Core in ArduinoIDE
- Arduino Core in PlatformIO
Also please show the content of your platformio.ini
and a minimal example code to reproduce the error.
Thanks for you reply, Sivar
I’m currently using the infineon/XENSIV PAS CO2 library in PlatfomIO.
While uploading the example code (Continuous Mode) provided in the library, I encountered a ‘communication error 1’ in the PlatformIO terminal after uploading.
However, the wiring is correct because the same code works when uploaded via the Arduino IDE (GitHub - Infineon/arduino-pas-co2-sensor: Arduino library for Infineon's XENSIV™ Photoacoustic Spectroscopy (PAS) CO2 miniaturized sensor).
I am using library version 3.1.2 in both Arduino and PlatformIO environments.
also using example code for the same.
Please tell the missing information about the used Espressif32 Arduino version (PlatformIO & ArduinoIDE) and the content of your platformio.ini
Additionally please show the error message.
Espressif32 Version in Arduino IDE: 3.0.7
Espressif32 Version in PlatformIO: 6.7.0
and please find the content of platforio.ini file,
; PlatformIO Project Configuration File
;
; Build options: build flags, source filter
; Upload options: custom upload port, speed and extra flags
; Library options: dependencies, extra library storages
; Advanced options: extra scripting
;
; Please visit documentation for the other options and examples
; Redirecting...
[env:firebeetle32]
platform = espressif32
board = firebeetle32
framework = arduino
lib_deps =
adafruit/Adafruit Unified Sensor@^1.1.15
infineon/XENSIV PAS CO2@^3.1.2
jaenrig-ifx2/pas-co2-sensor@^1.0.3
paulstoffregen/OneWire@^2.3.8
and in the output of terminal i got
error code :1
Remove this from the lib_deps
. This leads to an outdated version 1.0.3 of the library (4 years ago)
Also remove adafruit/Adafruit Unified Sensor@^1.1.15
(if it is not used in your sketch)
This platform version maps to Espressif Arduino 2.0.17
The latest official Espressif32 Arduino version is 2.0.19 (espressif32 @ 6.9.0
)
To get the latest Espressif32 Arduino 3.1.1 please try pioarduino:
platform = https://github.com/pioarduino/platform-espressif32/releases/download/53.03.11/platform-espressif32.zip
A similar issue was reported back in 2023 but was not answered by the maintainers of the library. See continuous-mode.ino works in Arduino IDE but not in PlatformIO. · Issue #19 · Infineon/arduino-pas-co2-sensor · GitHub