These are chat archives for esp8266/Arduino

9th
Jan 2017
Stavros Korokithakis
@skorokithakis
Jan 09 2017 11:36
@martinayotte no, nothing like that, just an arrangement that would trigger one relay when the wire was grounded, another when it was connected to Vcc, and neither relay when it was floating
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
Aaron N.
@porkyneal
Jan 09 2017 11:55
@skorokithakis Could you use a single relay, SPDT? So one circuit normaly open and one normally closed.
Stavros Korokithakis
@skorokithakis
Jan 09 2017 12:55
@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
Ash
@ashthespy
Jan 09 2017 15:01
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?
Martin Ayotte
@martinayotte
Jan 09 2017 16:54
esptool.py --port /dev/ttyUSB0 erase_flash
BTW, ESP.getFreeHeap() returns RAM not Flash size.
Ash
@ashthespy
Jan 09 2017 17:13
@martinayotte have I understood this correctly, I have a 4M flash (mega bit) i.e 1Megabyte correct?
so when I use the esptool (https://github.com/igrr/esptool-ck) I need to set the default flash size from 512K? Or just directly run --erase_flash ?
PS: thanks for the heads up about the FreeHeap, feel a bit foolish now! :worried:
Martin Ayotte
@martinayotte
Jan 09 2017 17:46
@ashthespy , 4Mbits == 512Kbytes
esptool.py will send erase_flash cmd for whatever size, no need to specify it.
Butch Anton
@ButchAnton
Jan 09 2017 18:27
@Palatis Mind if I ask you a quick question about RestClient?
brutzler
@brutzler
Jan 09 2017 19:46
Thought a ESP-12E has 4 MByte Flash??
Stavros Korokithakis
@skorokithakis
Jan 09 2017 19:47
@brutzler i think it does
well, i'm pretty sure it does
does anyone remember what that weird dev board with the RGB LED, photoresistor and buttons is called? @martinayotte
Ash
@ashthespy
Jan 09 2017 19:47
Wiity :=-)
Stavros Korokithakis
@skorokithakis
Jan 09 2017 19:47
ah, thanks
Ash
@ashthespy
Jan 09 2017 19:47
Witty*
Stavros Korokithakis
@skorokithakis
Jan 09 2017 19:48
brutzler
@brutzler
Jan 09 2017 19:49
@skorokithakis just thinking why they dont pack them together on your link. Why the wiring?
Stavros Korokithakis
@skorokithakis
Jan 09 2017 19:50
@brutzler the wiring was there already from the previous thermostat :/
Ash
@ashthespy
Jan 09 2017 19:50
@brutzler I guess to use GPIO's while flashing/debugging?
Stavros Korokithakis
@skorokithakis
Jan 09 2017 19:52
oh sorry
yeah, it's so the flasher isn't on the chip
i'm trying to flash micropython on it but it's not liking me at all
keeps flashing the onboard led
@ashthespy do you know if i need to press a button when flashing it?
Ash
@ashthespy
Jan 09 2017 19:54
Since there are people here! Humor me -
ESP.getFlashChipRealSize() = 1048576 bytes -> 1Megabyte
8 bits = 1 byte, -> My flash is 8Megabits?
@skorokithakis : I guess it depends on what flash/reset method you are using during flashing.
I think it uses the nodemcu trick, but you can always force it by holding the flash button on boot.
Stavros Korokithakis
@skorokithakis
Jan 09 2017 19:56
hmm, right... now, to find the flash button :smile:
Ash
@ashthespy
Jan 09 2017 19:57
The one under the LED should be flash (right one when looking from on top)
Stavros Korokithakis
@skorokithakis
Jan 09 2017 19:58
ah, thanks
Ash
@ashthespy
Jan 09 2017 20:00
:-)
Stavros Korokithakis
@skorokithakis
Jan 09 2017 20:01
hmm yeah, my firmware works properly, the micropython firmware isn't working
i wonder why
Ash
@ashthespy
Jan 09 2017 20:02
Hmm, no experience with micropython..
Stavros Korokithakis
@skorokithakis
Jan 09 2017 20:03
ah, thanks
Ash
@ashthespy
Jan 09 2017 21:50
I just upgraded to esptool v 1.3.1 and I can't get any commands to work. esptool.py --port COM4 flash_id returns esptool: error: too few arguments any ideas?
Ash
@ashthespy
Jan 09 2017 22:07
Nevermind, got it to work, erased my flash, but still not luck with OTA :-(
Ash
@ashthespy
Jan 09 2017 22:16
does anyone know what flash size has `Manufacturer: e0 ,Device: 4014'
Ash
@ashthespy
Jan 09 2017 22:22
If I understand this correctly, my chip should be 2^14 = 1M or 8Mib correct?
Ash
@ashthespy
Jan 09 2017 22:44
I have progress! So it would seem my module has a 1M flash chip, so after changing the flash size from 4M down to 1M, I have now progressed from OTA_BEGIN_ERROR to an OTA_END_ERROR :-D