The schematic is two relays and two diodes, one to ground and one to Vcc, so when you ground the wire, current flows from Vcc to ground through one relay, when you connect it to Vcc current flows from Vcc to ground through the other relay
@skorokithakis Could you use a single relay, SPDT? So one circuit normaly open and one normally closed.
@porkyneal no, because i need three states :/ it's for driving a motor forward and reverse, and stopping it
so i need two relays, one for direction and one to interrupt the flow of current
Hey guys, what is the preferred way to clear the ESP's flash? I have some ESP-12S modules that seem to already have some code on them. ESP.getFlashChipRealSize() returns 1048576 bytes. My compiled sketch is 250016 bytes. However, ESP.getFreeHeap() returns 45728 bytes. Am I wrong, or is there something already on the flash, and what would be the best way to clear it?
esptool.py --port /dev/ttyUSB0 erase_flash
BTW, ESP.getFreeHeap() returns RAM not Flash size.
@martinayotte have I understood this correctly, I have a 4M flash (mega bit) i.e 1Megabyte correct?