I have 3 of these setup now and have not been able to read anything but -2 from the s8 as of yet.
I am using CO2_Simple sample code
Here are some of my tries:
- Ensure good stable 5V supply - I do see a small led flash in the sensor roughly every 3-5 seconds
- Tried changing code delays/timeouts
- Checked soldering
- Breadboarded circuit so same as AirGradient pcb
- Tried using different D1 mini’s
- Tried several different SoftwareSerial libraries.
- Tried building/testing with Arduino IDE.
I do use PlatformIO to build using VSCode.
Blink app works fine
Only thing that I cant seem to verify is that SoftwareSerial is working correctly, and I have a feeling that is the problem. PlatformIO seems to default to EspSoftwareSerial @ 6.12.7 is this the best one?
Here is a log:
Processing d1 (platform: espressif8266; board: d1; framework: arduino)
--------------------------------------------------------------------------------------------Verbose mode can be enabled via `-v, --verbose` option
CONFIGURATION: https://docs.platformio.org/page/boards/espressif8266/d1.html
PLATFORM: Espressif 8266 (4.0.1) > WEMOS D1 R1
HARDWARE: ESP8266 80MHz, 80KB RAM, 4MB Flash
PACKAGES:
- framework-arduinoespressif8266 @ 3.30002.0 (3.0.2)
- tool-esptool @ 1.413.0 (4.13)
- tool-esptoolpy @ 1.30000.201119 (3.0.0)
- tool-mklittlefs @ 1.203.210628 (2.3)
- tool-mkspiffs @ 1.200.0 (2.0)
- toolchain-xtensa @ 2.100300.210717 (10.3.0)
LDF: Library Dependency Finder -> https://bit.ly/configure-pio-ldf
LDF Modes: Finder ~ chain, Compatibility ~ soft
Found 36 compatible libraries
Scanning dependencies...
Dependency Graph
|-- AirGradient Air Quality Sensor @ 1.5.0
| |-- EspSoftwareSerial @ 6.12.7
| |-- Wire @ 1.0
Building in release mode
Retrieving maximum program size .pio\build\d1\firmware.elf
Checking size .pio\build\d1\firmware.elf
Advanced Memory Usage is available via "PlatformIO Home > Project Inspect"
RAM: [==== ] 35.6% (used 29156 bytes from 81920 bytes)
Flash: [=== ] 26.2% (used 273741 bytes from 1044464 bytes)
Configuring upload protocol...
AVAILABLE: espota, esptool
CURRENT: upload_protocol = esptool
Looking for upload port...
Auto-detected: COM3
Uploading .pio\build\d1\firmware.bin
esptool.py v3.0
Serial port COM3
Connecting....
Chip is ESP8266EX
Features: WiFi
Crystal is 26MHz
MAC: 40:91:51:53:16:7a
Uploading stub...
Running stub...
Stub running...
Configuring flash size...
Compressed 277888 bytes to 203583...
Writing at 0x00000000... (7 %)
Writing at 0x00004000... (15 %)
Writing at 0x00008000... (23 %)
Writing at 0x0000c000... (30 %)
Writing at 0x00010000... (38 %)
Writing at 0x00014000... (46 %)
Writing at 0x00018000... (53 %)
Writing at 0x0001c000... (61 %)
Writing at 0x00020000... (69 %)
Writing at 0x00024000... (76 %)
Writing at 0x00028000... (84 %)
Writing at 0x0002c000... (92 %)
Writing at 0x00030000... (100 %)
Wrote 277888 bytes (203583 compressed) at 0x00000000 in 18.0 seconds (effective 123.8 kbit/s)...
Hash of data verified.
Leaving...
Hard resetting via RTS pin...
=============================== [SUCCESS] Took 22.01 seconds ===============================
19:27:19.980 > ₆₅₅₃₃ ₆₅₅₃₃ ₆₅₅₃₃ CO2 Successfully Initialized. Heating up for 10s
19:27:30.291 > C02: -2
19:27:35.506 > C02: -2
19:27:40.721 > C02: -2
19:27:45.936 > C02: -2
19:27:51.150 > C02: -2
19:27:56.366 > C02: -2
19:28:01.581 > C02: -2
19:28:06.795 > C02: -2
platformio.ini:
[env:d1]
platform = espressif8266
board = d1
framework = arduino
board_build.mcu = esp8266
Does anyone else see garbage character through the serial monitor at every startup, or just me…
Any ideas, suggestions appreciated…