My project involves an ESP8266-01S with three sensors: GPIO0 controls a 5V relay, GPIO2 is set as an input for a PIR sensor, and GPIO3 (the RX signal) is configured as an input for a proximity sensor. After consulting notes from this and other forums and overcoming the usual developer challenges, the project is functioning well (tested for ~48 hrs of active use)
I then integrated Blynk, which was initially unfamiliar to me. However, I managed to grasp basics, got the Blynk app working on my mobile device, and configured it to receive notifications from the sensors. Subsequently I implemented dynamic WiFi credentials, thanks to assistance from this forum and Pete’s responses. Following that, I enabled OTA, which also functioned after resolving a few teething issues.
During testing, the project crashed after 3-4 hours and lost the WiFi credentials. Re-entering the credentials and performing a power cycle restored functionality, but this behavior is obviously undesirable.
The issues that plague me are as follows:
[1] Debugging is challenging because GPIO3 is in use, ruling out its RX function. I am using relay on/off morse code for debugging, which is cumbersome.
[2] To ensure that GPIO3 is configured as an input, I included the following code:
Serial.begin(115200, SERIAL_8N1, SERIAL_TX_ONLY);
My question is whether my use of GPIO0, GPIO2, GPIO3, and/or the above Serial setup could interfere with the BlynkEdgent code and cause a crash.
[3] For this project, I want to hardcode the WiFi SSID and password while retaining the OTA feature. Is there a way to use only the OTA feature of BlynkEdgent without employing dynamic WiFi setup? I foresee a conflict because we cannot use both Blynk.begin(auth, ssid, pass); and BlynkEdgent.begin();
I have not included my code here, as it appears to function correctly. If necessary, I can provide it.