I2C Slave Library Not Working
Posted: Thu Jan 13, 2022 8:30 pm
I'm trying to set up an Olimex-POE module to work as an I2C slave. The docs provide an example of an I2C slave programme (https://docs.espressif.com/projects/ard ... eslave-ino). However, when I try to compile it it gives me the error:
If I comment that line out, it also gives me the compilation error
Given that this is example code, I'm not sure how it could be failing. Maybe it's not reading the ESP32 wire library correctly?
Any help would be greatly appreciated.
Code: Select all
'class TwoWire' has no member named 'slaveWrite'
Code: Select all
sketch/Olimex_Module.ino.cpp.o:(.literal._Z5setupv+0x1c): undefined reference to `TwoWire::onReceive(void (*)(int))'
sketch/Olimex_Module.ino.cpp.o:(.literal._Z5setupv+0x20): undefined reference to `TwoWire::onRequest(void (*)())'
sketch/Olimex_Module.ino.cpp.o: In function `setup()':
<my sketch path>/Olimex_Module/Olimex_Module.ino:38: undefined reference to `TwoWire::onReceive(void (*)(int))'
<my sketch path>/Olimex_Module/Olimex_Module.ino:38: undefined reference to `TwoWire::onRequest(void (*)())'
collect2: error: ld returned 1 exit status
exit status 1
Error compiling for board OLIMEX ESP32-PoE.
Any help would be greatly appreciated.