Programming the Sonoff TH16 version 2.1
Sonoff make a range of Wi-Fi-connected devices for various monitoring and switching applications based around ESP8266 processors. As I wasn't happy with the performance of the thermostat in the fridge in the house I'm renting I got a few of their TH16 switches with the idea of using one of them to switch the fridge on and off without freezing the food in the salad compartment.
A few sources indicate that supplying power to these devices while flashing programs in them is tricky. tl;dr, I found that a surprisingly high voltage, about 3.9 volts or higher, was needed to load software in the version 2.1 devices I received. I'll explain the process by which I got to this conclusion in some detail as there may be some useful hints for others along the way.
More...