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

Unable to build with Platformio because of missing dependency for BH1750 Light Sensor #447

Closed
whatisbyandby opened this issue Jul 13, 2023 · 0 comments · Fixed by #448
Closed

Comments

@whatisbyandby
Copy link
Contributor

Describe the bug
Unable to build the firmware with Platformio due to a missing dependency for the BH1750 Light Sensor.

Arduino board
Adafruit QT Py ESP32-S2

To Reproduce
Steps to reproduce the behavior:

  1. Clone the Adafruit Wippersnapper Arduino Repository
  2. Open the project in VS Code with the Platformio extension installed
  3. Wait for the Platformio project configuration to complete
  4. Select the env:adafruit_qtpy_esp32s2
  5. Click the Build task button
  6. The compilation fails, due to a missing dependency for the BH1750 light sensor

The error that is causing the compilation to fail

#include <hp_BH1750.h> //include the library for the BH1750 sensor
^~~~~~~~~~~~~
compilation terminated.
*** [.pio/build/adafruit_qtpy_esp32s2/src/Wippersnapper.cpp.o] Error 1
In file included from .pio/libdeps/adafruit_qtpy_esp32s2/Adafruit TinyUSB Library/src/tusb_option.h:193,
from .pio/libdeps/adafruit_qtpy_esp32s2/Adafruit TinyUSB Library/src/Adafruit_TinyUSB.h:35,
from .pio/libdeps/adafruit_qtpy_esp32s2/Adafruit NeoPixel/Adafruit_NeoPixel.h:48,
from src/components/statusLED/Wippersnapper_StatusLED.h:19,
from src/Wippersnapper.h:35,
from src/components/analogIO/Wippersnapper_AnalogIO.h:19,
from src/components/analogIO/Wippersnapper_AnalogIO.cpp:17:
.pio/libdeps/adafruit_qtpy_esp32s2/Adafruit TinyUSB Library/src/common/tusb_mcu.h:362:4: warning: #warning "TUP_DCD_ENDPOINT_MAX is not defined for this MCU, default to 8" [-Wcpp]
#warning "TUP_DCD_ENDPOINT_MAX is not defined for this MCU, default to 8"
^~~~~~~
In file included from src/components/i2c/WipperSnapper_I2C.h:25,
from src/Wippersnapper.h:40,
from src/components/analogIO/Wippersnapper_AnalogIO.h:19,
from src/components/analogIO/Wippersnapper_AnalogIO.cpp:17:
src/components/i2c/drivers/WipperSnapper_I2C_Driver_BH1750.h:5:10: fatal error: hp_BH1750.h: No such file or directory

Expected behavior
The project should build, and compilation should succeed

Which components are connected to your device
None

Screenshots
N/A

Desktop (please complete the following information):

  • OS: Raspberry Pi OS (Remote Development from VS Code)
  • Editor: VS Code on Windows

Additional context
It looks like I forgot to add the dependency to the platformio.ini file for the BH1750 sensor I added earlier this week.
I was able to resolve this issue by adding the library to the end of the list of lib_deps common for all envs in the platformio.ini

I apologize I missed testing the platformio build, I was doing all my testing with the Arduino IDE. I'll open a PR that adds the dependency to the platformio.ini file.

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