-->
Page 1 of 1

Project guidance using I2C

PostPosted: Fri Apr 24, 2015 2:17 pm
by Leandro Silva
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?

Re: Project guidance using I2C

PostPosted: Fri Apr 24, 2015 5:35 pm
by martinayotte
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 ...

Re: Project guidance using I2C

PostPosted: Fri Apr 24, 2015 6:11 pm
by Leandro Silva
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.