HOW TO SONOFF ESPBASIC
Do not hookup to mains to program!
USE THE FOLLOWING IMAGE AS A REFERENCE!
solder pin header on the 4 pins in the picture above.
if you have a 5th pin it is a new version the 5th pin is GPIO14 good for DHT sensor no worries ignore this!
Once you have header soldered hook to usb to serial as follows
GND to GND
TX to RX
RX to TX
VCC to VCC
before you plug in
OPEN basic flasher
select com port
select 1MB flash
hold the button down to enter programming mode.
Plug in but keep holding button down then push firmware flash in espbasic you should see com lights blink on your usb to serial fairly rapidly wait you can let go of button and let it do its thing until you get a msg ..................................................... with a bunch of dots.
Now reset and connect.
According to what I can find here is the wiring diagram for SONOFF
Type A plugs are generally polarised and can only be inserted one way because the two blades do not have the same width. The blade connected to neutral is 7.9 mm wide and the hot blade is 6.3 mm wide.
Usually if both wires are the same color one of them has writing on it to help you distinguish the difference.
Now we want to switch our hot so it would be nice to know if that wiring diagram is 100% correct for safety purposes. It is supposed to handle 10A that is 1200 watts of power but for safety I would not trust this much power I'd suggest using a power switch tail II for larger appliances.
Anyhow I hope this guide has helped don't forget I accept dogecoin for the cause 24/7 just donate using the address below! Any little bit will help me test out more hardware and share more findings.
relay uses pin 12 so make your code to fit this accordingly!
Have fun SONOFFing
- forlotto
Where I buy my ESP8266 boards from... (Banggood)