I hope this is the right place to ask this.
My hardware:
An ssd1306 OLED on a Wemos D1 Mini, and a ds18b20 temperature sensor on D4. All powered from a 10-AMP USB supply.
My project is to simply display the temperature from the ds18b20 on the oled display. It's been working for weeks. Until I tried to upload the code to a new Wemos. Now the program compiles and uploads without error, but I never even get to setup(). (The first thing that setup does is Serial.begin followed by a Serial.print with a welcome message.)
The same sketch on a NodeMCU works fine.
The same sketch on the original Wemos D1 Mini also fails like the new Wemos.
Through lots of head-scratching and experimenting, I've determined that I2C stopped working on the Wemos. (Both of them?)
The I2Cscanner sketch runs just fine on the NodeMCU. I added more I2C devices and the I2Cscanner on the NodeMCU found all of them. But the I2Cscanner on the Wemos can't find any I2C devices.
No wiring changed. No code changed - I have double-checked the wiring multiple times: SDA is on D2, SCL is on D1. I even went to an older IDE with older libraries and the result is the same- no I2C devices found.
Any ideas?