Example sketches for the new Arduino IDE for ESP8266

Moderator: igrr

User avatar
By kolban
#24944 Thanks Martin,
That looked REALLY hopeful ... unfortunately, I have those lines in my code at:

C:\Users\<MyUserid>\AppData\Roaming\Arduino15\packages\esp8266\hardware\esp8266\1.6.5-947-g39819f0\libraries\Wire

However, I have some new clues that have me puzzled. I have a logic analyzer and am seeing "data" on the SDA line but a constant high on the CLK line. Obviously that isn't right ... so I'm now investigating that route. I can't imagine debugging this without a logic analyzer.

Neil
User avatar
By martinayotte
#24945 Yes ! Logic analyser can really help !
I remember such bug with an STM32, I've put my logic analyser to discover that I had simply inverted SDA/SCK lines ... ;)
What are the devices that you put on this I2C bus ?
User avatar
By kolban
#24947 Howdy Martin,

First device I tried was a PCF8574. However, when that didn't respond and since I never worked with that device previously, I switched over to a GY-302. It too failed to respond. So that made me question the Wire.cpp library so I backed off to use i2c_master.c from the Espressif SDK ... and THAT too is not returning data. However, in all cases, my CLK line is flat high ... and that is obviously wrong. Ive backed through all the software and even tried a couple of different ESP-12s. In the next hour I'm backing up even further and will be checking my board for shorts. I am using GPIO4 for SDA and GPIO5 for CLK ... so I want to prove to my self I can "blinky" and LED from GPIO5 before I go much further.

I'm trying to follow all the paths and gather all the evidence I can ... and since I have a few avenues to follow, I'm not out of options yet ... but the obvious ones haven't panned out.

Neil
User avatar
By kolban
#24949 I'd have called you a liar if you had told me this story ....

Since I wasn't seeing any clock signal with my analyzer and had poured through my code and had convinced myself that the signal was toggling (from a logical perspective), I got out my resistance meter and started checking connectivity ... thinking that maybe I had broken a solder joint somewhere/somehow. In the end I traced it to a dupont wire connector with two male pins. Zero connectivity between the ends.

Ive never had this happen to me before ... and it shakes my core trust .... do I now have to actually check every wire in my circuit when something doesn't work!!

Now ... off to test my solution with a new wire ...

Neil
..

Later ...

Yup ... all now works ...

Code: Select allScanning...
I2C device found at address 0x23 !
done





brokenwire.png
You do not have the required permissions to view the files attached to this post.