Its been a love/hate month but I feel like I have the chip down pat on most things, but of recent I have had issues with connecting up the JSN-SR04T-2.0 Ultrasonic sensor (for a water tank level reading).
I am using the NewPing library v1.8 as all the newer ones threw a wobbler when compiling, I am using GPIO0/2 for the Trigger/Echo and a 3.3k pull up on GPIO0, I have the SR04 powered by the 3.3v supply.
If I boot it with everything connected, it won't start. In the serial monitor, I get an endless loop of character gargan, not even any of my sketch serial prints.
BUT if I remove the echo pin from the SR04 on boot and once running setup connected it again, bam all works sweet as. I can't detect any weird voltage spikes and adding a pullup to GPIO2 or a voltage divider does nothing.
Now in a normal world with a larger waterproof enclosure I would just use one of my ESP-12s and use a Mosfet on another input to delay the connection of the echo pin, but I only got 2 IOs and I really like to keep the TX/RX IOs free for debugging. I really need this to work as I am soldering the reset to the GPIO 16 for deep sleep, and needed to unplug the echo pin on restart is definitely not an option.
Anyone experience this weird behaviour or have any tips on how to figure out what's causing it.
Thanks Dave