- Thu May 21, 2015 5:30 pm
#18123
martinayotte wrote:@tytower, check my post at viewtopic.php?f=28&t=2991#p17753
you can either continue to use the deprecated Wire.pins or applying the fix I did in Wire.cpp :
Code: Select allvoid TwoWire::begin(int sda, int scl){
+ default_sda_pin = sda;
+ default_scl_pin = scl;
twi_init(sda, scl);
flush();
}
I find that interesting .
I looked in the Wire library which is now in /hardware/arduino/avr/libraries just to confuse things .
I found no function "void TwoWire::begin(int sda, int scl)" but using Wire.begin(sda,scl); is recognised in the IDE 1.6.4.so I don't follow why it recognises it
I put the above in the .cpp file and in the .h file and it made no difference. It didn't complain of being defined twice either so I am wondering why. Wire is defined to be TwoWire of course
Wire.pins(sda,scl); will also compile but does not show as recognised in the IDE. Playing around with that and with Wire.setClock(Varius speeds ie40000); I could not get my device to work on pins 4 and 5 at all
Seems to be an issue being resolved on github now
https://github.com/esp8266/Arduino/issues/254I put my bit in if it helps