Hi All !
I’m trying to make this work using this github repo and I’m getting this error. I’m new to HA and esphome. I have a
I have this in the yaml file:
platform: ESP32
board: esp32dev
includes:
- VL53/
libraries:
- "VL53L1x"
- "Wire"
i also created a folder ‘VL53’ at the config level where I have the tof_vl53l1x.h and the Wire.h files. adding Wire library does not fix it either. Any hints as to why this behaving like this would be great. thanks.
INFO Reading configuration /config/esphome/tt.yaml…
INFO Generating C++ source…
INFO Compiling app…
Processing tt (board: esp32dev; framework: arduino; platform: platformio/espressif32 @ 5.2.0)
Library Manager: Installing esphome/AsyncTCP-esphome @ 1.2.2
INFO Installing esphome/AsyncTCP-esphome @ 1.2.2
Unpacking [####################################] 100%
Library Manager: [email protected] has been installed!
INFO [email protected] has been installed!
Library Manager: Installing esphome/ESPAsyncWebServer-esphome @ 2.1.0
INFO Installing esphome/ESPAsyncWebServer-esphome @ 2.1.0
Unpacking [####################################] 100%
Library Manager: [email protected] has been installed!
INFO [email protected] has been installed!
Library Manager: Resolving dependencies…
INFO Resolving dependencies…
Library Manager: Installing esphome/noise-c @ 0.1.4
INFO Installing esphome/noise-c @ 0.1.4
Unpacking [####################################] 100%
Library Manager: [email protected] has been installed!
INFO [email protected] has been installed!
Library Manager: Resolving dependencies…
INFO Resolving dependencies…
Library Manager: Installing esphome/libsodium @ 1.10018.1
INFO Installing esphome/libsodium @ 1.10018.1
Unpacking [####################################] 100%
Library Manager: [email protected] has been installed!
INFO [email protected] has been installed!
HARDWARE: ESP32 240MHz, 320KB RAM, 4MB Flash
- toolchain-xtensa-esp32 @ 8.4.0+2021r2-patch3
LDF: Library Dependency Finder → Library Dependency Finder (LDF) — PlatformIO latest documentation
Library Manager: Installing VL53L1x
Library Manager: Warning! More than one package has been found by VL53L1x requirements:
Library Manager: - pololu/[email protected]
Library Manager: - mbed-jvfausto/[email protected]+sha.621552ff1de9
Library Manager: - mbed-st-expansion-sw-team/[email protected]+sha.f16727052990
Library Manager: - mbed-1576028839/[email protected]+sha.a71614c1b15b
Library Manager: Please specify detailed REQUIREMENTS using package owner and version (shown above) to avoid name conflicts
Unpacking [------------------------------------] 0%
Unpacking [##----------------------------------] 7%
Unpacking [#####-------------------------------] 14%
Unpacking [#######-----------------------------] 21%
Unpacking [##########--------------------------] 28%
Unpacking [############------------------------] 35%
Unpacking [###############---------------------] 42%
Unpacking [##################------------------] 50%
Unpacking [####################----------------] 57%
Unpacking [#######################-------------] 64%
Unpacking [#########################-----------] 71%
Unpacking [############################--------] 78%
Unpacking [##############################------] 85%
Unpacking [#################################—] 92%
Unpacking [####################################] 100%
Library Manager: [email protected] has been installed!
Dependency Graph
|-- AsyncTCP-esphome @ 1.2.2
|-- VL53L1X @ 1.3.1
|-- Wire @ 2.0.0
|-- WiFi @ 2.0.0
|-- FS @ 2.0.0
|-- Update @ 2.0.0
|-- ESPAsyncWebServer-esphome @ 2.1.0
| |-- AsyncTCP-esphome @ 1.2.2
|-- DNSServer @ 2.0.0
|-- ESPmDNS @ 2.0.0
|-- noise-c @ 0.1.4
| |-- libsodium @ 1.10018.1
Compiling /data/tt/.pioenvs/tt/src/VL53L1X.cpp.o
Compiling /data/tt/.pioenvs/tt/src/esphome/components/api/api_connection.cpp.o
In file included from src/VL53L1X.cpp:6:
src/VL53L1X.h:1275:17: error: ‘TwoWire’ has not been declared
void setBus(TwoWire * bus) { this->bus = bus; }
^~~~~~~
src/VL53L1X.h:1276:5: error: ‘TwoWire’ does not name a type; did you mean ‘TwoWire_h’?
TwoWire * getBus() { return bus; }
^~~~~~~
TwoWire_h
src/VL53L1X.h:1361:5: error: ‘TwoWire’ does not name a type; did you mean ‘TwoWire_h’?
TwoWire * bus;
^~~~~~~
TwoWire_h
src/VL53L1X.h: In member function ‘void VL53L1X::setBus(int*)’:
src/VL53L1X.h:1275:40: error: ‘class VL53L1X’ has no member named ‘bus’
void setBus(TwoWire * bus) { this->bus = bus; }
^~~
src/VL53L1X.cpp: In constructor ‘VL53L1X::VL53L1X()’:
src/VL53L1X.cpp:12:5: error: class ‘VL53L1X’ does not have any field named ‘bus’
: bus(&Wire)
^~~
src/VL53L1X.cpp:12:10: error: ‘Wire’ was not declared in this scope
: bus(&Wire)
^~~~
src/VL53L1X.cpp:12:10: note: suggested alternative: ‘pipe’
: bus(&Wire)
^~~~
pipe
src/VL53L1X.cpp: In member function ‘void VL53L1X::writeReg(uint16_t, uint8_t)’:
src/VL53L1X.cpp:164:3: error: ‘bus’ was not declared in this scope
bus->beginTransmission(address);
^~~
src/VL53L1X.cpp: In member function ‘void VL53L1X::writeReg16Bit(uint16_t, uint16_t)’:
src/VL53L1X.cpp:174:3: error: ‘bus’ was not declared in this scope
bus->beginTransmission(address);
^~~
src/VL53L1X.cpp: In member function ‘void VL53L1X::writeReg32Bit(uint16_t, uint32_t)’:
src/VL53L1X.cpp:185:3: error: ‘bus’ was not declared in this scope
bus->beginTransmission(address);
^~~
src/VL53L1X.cpp: In member function ‘uint8_t VL53L1X::readReg(VL53L1X::regAddr)’:
src/VL53L1X.cpp:200:3: error: ‘bus’ was not declared in this scope
bus->beginTransmission(address);
^~~
src/VL53L1X.cpp: In member function ‘uint16_t VL53L1X::readReg16Bit(uint16_t)’:
src/VL53L1X.cpp:216:3: error: ‘bus’ was not declared in this scope
bus->beginTransmission(address);
^~~
src/VL53L1X.cpp: In member function ‘uint32_t VL53L1X::readReg32Bit(uint16_t)’:
src/VL53L1X.cpp:233:3: error: ‘bus’ was not declared in this scope
bus->beginTransmission(address);
^~~
src/VL53L1X.cpp: In member function ‘void VL53L1X::readResults()’:
src/VL53L1X.cpp:669:3: error: ‘bus’ was not declared in this scope
bus->beginTransmission(address);
^~~
*** [/data/tt/.pioenvs/tt/src/VL53L1X.cpp.o] Error 1
========================== [FAILED] Took 6.59 seconds ==========================