kmetz / coro2sens

Build a simple device that warns if CO₂ concentration in a room becomes a risk for COVID-19 aerosol infections.
MIT License
31 stars 8 forks source link

Compiling error (solved) #4

Closed M4rt1n12 closed 2 years ago

M4rt1n12 commented 2 years ago

Hi,

I just finished your instructions. I have an ESP8266 board, a Seeed SCD30 and a 3V piezo speaker. I had to download and integrate almost all of the libraries as zips because they were not found in the board manager.

I do not need the LED function and the BME280. When I wanted to compile the script, I got the following error message:

Arduino: 1.8.20 Hourly Build 2021/12/20 07:34 (Mac OS X), Board: "Arduino Uno"

In file included from /Users/privat/Downloads/coro2sens/coro2sens/coro2sens/coro2sens.ino:99:0:
/Users/privat/Documents/Arduino/libraries/ESPAsyncWebServer-master/src/ESPAsyncWebServer.h:26:10: fatal error: functional: No such file or directory
 #include <functional>
          ^~~~~~~~~~~~
compilation terminated.
exit status 1
Error compiling for Arduino Uno board.

This report would be more detailed if the option
"Verbose output during compilation"
in File -> Preferences would be activated.

Do the errors occur because the components are missing?

M4rt1n12 commented 2 years ago

I compiled it with VSCode, there it works. Is it possible to access the data with command line? Because I have no WLAN chip yet.

kmetz commented 2 years ago

Thanks for reporting issues with using the Arduino IDE.

I assume you used PlatformIO with VSCode? It would then have downloaded all dependencies.

Data is printed out on the serial port, so you can just monitor it with the ESP connected via USB. When using PlatformIO you can simply open a serial monitor with pio device monitor on the command line (in the project directory).

kmetz commented 2 years ago

@M4rt1n12 Following up on issues with the Arduino IDE: Have you also looked in the library manager? It's separate from the board manager.

M4rt1n12 commented 2 years ago

unfortunaly the command pio doesn't work in my VSCode

grafik

Does this output have anything to do with it?

Reading symbols from [/Users/privat/Downloads/coro2sens/coro2sens/.pio/build/esp32dev/firmware.elf...]()
done.
PlatformIO Unified Debugger -> [https://bit.ly/pio-debug]()
PlatformIO: debug_tool = esp-prog
PlatformIO: Initializing remote target...
Open On-Chip Debugger  v0.10.0-esp32-20210721 (2021-07-21-13:34)
Licensed under GNU GPL v2
For bug reports, read
    [http://openocd.org/doc/doxygen/bugs.html]()
adapter speed: 20000 kHz
WARNING: boards[/esp-wroom-32.cfg]() is deprecated, and may be removed in a future release.
adapter speed: 5000 kHz

Info : tcl server disabled
Info : telnet server disabled
Error: no device found
Error: unable to open ftdi device with vid 0403, pid 6010, description '*', serial '*' at bus location '*'
Error: no device found
Error: unable to open ftdi device with vid 0403, pid 6014, description '*', serial '*' at bus location '*'

Assertion failed: (jtag_trst == 0), function jtag_checks, file .[./src/jtag/core.c](), line 343.
.pioinit:11: Error in sourced command file:
Remote connection closed

grafik

M4rt1n12 commented 2 years ago

@M4rt1n12 Following up on issues with the Arduino IDE: Have you also looked in the library manager? It's separate from the board manager.

OH there it is! But the board itself I had to add with a link I added in the preferences. Because it was not found in the board manager

kmetz commented 2 years ago

So you had success?

Regarding pio: maybe try platformio instead of pio (which is a short version which might not be available depending on the installation). I must admit I'm unfamiliar with PlatformIO under windows.

The error you posted before refers to a hardware debugger device which is not found (and also not needed):

Error: unable to open ftdi device with vid 0403, pid 6010, description '*', serial '*' at bus location '*'

This seems related to the build mode being misconfigured somehow in VSCode.

M4rt1n12 commented 2 years ago

Hallo Kaspar, thank you for your efforts! the board was recently recognized less and less, neither on the active nor on the passive usb hub connected to my macbook pro. I have already set the baud rate to 115200, but it no longer works. After some google I found some hints here Maybe a firmware downgrade or reset board in flash mode helps

grafik

platformio is also not recognized:

grafik
M4rt1n12 commented 2 years ago

Hi Kaspar, I just bought the ESP32 and it works! But the temperature of the SCD30 is quite inaccurate, I definitly don't have 26.5° C temperature, more 20-21°, anyway the CO2 sensor seems to work fine. I've got the BME280, did I get it right that I need some kind of Y-Link so that VCC of SCD and BME get the same PIN on the board?