Moderator: igrr
I gave it a try and it is much better.
No more watchdog crash on SerialRX.
But I saw that I2C was still not working.
But I've figured out something : if I use the now deprecated Wire.pins(12,13), it is actually working. So the problem is somewhere is the newer Wire.begin(12, 13).
I will dig further ...
EDIT : some digging done !
I've changed the follwing code :
void TwoWire::begin(int sda, int scl){
+ default_sda_pin = sda;
+ default_scl_pin = scl;
twi_init(sda, scl);
flush();
}
it sounds like there is a call to TwoWire::begin(void) after TwoWire::begin(int sda, int scl), which overwrite the previous pins.
Anyway, I have now that workaround...
EDIT2: It is a false positive, it is working after upload, but if I do a reset, it stop working. Really strange
(I think I will have to revert again to the March 27 version)
EDIT3: The constructor issue and the stop after reset issue are separate, after power cycle, it is working again.
I'm using the nodemcu v3 development board and I had trouble using any gpio to talk via i2c with an adxl345. My question is if inserting that function in the wire.cpp file will do the trick so that now I can call wire.Begin(16,14) as my SDL and SCL pins? Is that correct? I'm using Arduino IDE 1.6.5 with the ESP8266 2.1.0 package as the board manager.
Thanks for your help!
It was also already fixed in 2.1.0, so I don't understand why you would have any issue.
The problem is probably somewhere else ...
Did you added PullUps resistors on the I2C bus ?
Don't rely in weak internal pullups, they are weak, especially in your case, GPIO16 doesn't have any internal pullup.