Closed gtom closed 8 years ago
Just format the file system once:
#include "FS.h"
void setup() {
Serial.begin(115200);
Serial.println("");
Serial.println("Mounting FS...");
if (!SPIFFS.begin()) {
Serial.println("Failed to mount file system");
return;
}
SPIFFS.format();
Serial.println("Done.");
}
void loop() { }
If you want, you can also change the reset button pin (you might add an external button): https://github.com/marvinroger/homie-esp8266/blob/master/docs/3.-Advanced-usage.md#reset
It would be great to work out how to make the onboard button work on the Wemos D1 mini so that we can press it for 5 seconds to get into configuration mode.
The button on the D1-mini is tied directly to reset on the Esp8266 so I don't think its possible to capture that. The Wemos button Shield ties pin D3 GPIO0 to GND. If you don't have the button shield, you could emulate that with a simple jumper from D3 on the D1-mini to GND for 5 seconds.
The Wemos schematics can be found here
What do we need to do in our sketches to make D3 on the D1-mini become the reset button?
D3 on the D1-mini is already connected to GPIO0 on the ESP-12 and GPIO0 is the default for Homie, so you shouldn't have to do anything in the code. Just hold D3 to GND for 5+ seconds.
I did run into a problem where the D1 always wanted to go into config mode. documented here .
Sorry guys, as @DavidStacer explained, the D1 mini button is tied to the reset, so there is no way to intercept the signal.
Hi, I did a misconfiguration in mqtt credentials, now my d1-mini is trying endless to connect to wrong server. I have a reset button on d1-mini, but after pressing it for 5 seconds, it always reboots into normal mode and tries to connect again. Top get into configuration mode, I have to press FLASH button, which doesn't exist on d1-mini. What can I do to get into configuration mode? Any way to reset the eeprom-file-system during flashing homie again? Thanks in advance Tom