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

Library doesn't work for ESP32 and ESP8266 in PlatformIO. #include <SPI.h>^~~~~~~ compilation terminated. #82

Open
WackoKacko opened this issue Jun 21, 2023 · 1 comment

Comments

@WackoKacko
Copy link

There is the build problem that I must add the following libraries to lib_deps:
https://github.com/adafruit/Adafruit_BusIO
https://github.com/adafruit/Adafruit_Sensor

However, the Adafruit_BusIO library causes the build to fail for the following reason:

#include <SPI.h>
^~~~~~~
compilation terminated.
*** [.pio\build\d1_mini\lib90c\Adafruit BMP280 Library\Adafruit_BMP280.cpp.o] Error 1

I'm a novice. Is there any way to fix this quickly in my case?

@bartoszwalicki
Copy link

bartoszwalicki commented Jun 24, 2024

HI. I have just checked. After installing fresh Platform IO inside VS Code and then installing Adafruit BMP280 library everything is building as expected. I am working with esp32 and here is my platformio.ini

; 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
; https://docs.platformio.org/page/projectconf.html

[env:esp32dev]
platform = espressif32
board = esp32dev
framework = arduino
lib_deps = adafruit/Adafruit BMP280 Library@^2.6.8

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants