The use of the ESP8266 in the world of IoT

User avatar
By Leandro Silva
#15527 I have a project running wifi Arduino+ESP8266+HMC5883L. I want to remove Arduino from my project but I'm facing some problems with HMC5883l libraries... First, I was thinking work with Lua (NodeMCU) but my libraries are written in C++. Then, I moved to Arduino IDE (adapted to ESP8266) but when I call "Wire.pins(0,2)" I got an error saying "error: 'class TwoWire' has no member named 'pins'"... Can anyone PLEASE give me some guidance to start?
User avatar
By martinayotte
#15536 The call to "Wire.pins(0,2)" is absolutely correct. So the error come from somewhere else.
Did you have an "#include <Wire.h>" ? If Yes, maybe it doesn't include the one from esp8266.
Try to start a new sketch from scratch and copy/paste your code gradually ...
User avatar
By Leandro Silva
#15538
martinayotte wrote:The call to "Wire.pins(0,2)" is absolutely correct. So the error come from somewhere else.
Did you have an "#include <Wire.h>" ? If Yes, maybe it doesn't include the one from esp8266.
Try to start a new sketch from scratch and copy/paste your code gradually ...


The problem was that I checked my board as Arduino where I should choose ESP

Now, I got this
Code: Select all/home/leandro/espIDE/Arduino/build/linux/work/hardware/tools/esp8266/xtensa-lx106-elf/bin/../lib/gcc/xtensa-lx106-elf/4.8.2/../../../../xtensa-lx106-elf/bin/ld: SPAlgorithm_ESP8266.cpp.elf section `.text' will not fit in region `iram1_0_seg'
collect2: error: ld returned 1 exit status
Error compiling.