I have an ESP-12 soldered onto this adapter board. I am using NodeMCU Lua based firmware to code the logic.
I have scheduled
node.restart to execute periodically. 1 of the GPIO pins is used to drive an external component using HIGH or LOW state. I can restore the GPIO state (HIGH/LOW) after
node.restart but during restart GPIO state is undefined. I want to maintain that state especially if the state was HIGH.
1 approach I have in my mind is to have another micro-controller such as ATTinyX which is connected to ESP-12 via UART. ESP-12 can give a string/char to ATTinyX to maintain the state (ESp-12 GPIO pin and ATTinyX pin is connected to the external component via an OR gate) and then go for a reboot. Once ESP-12 reboot is completed it can tell ATTinyX not to maintain the state because ESP-12 can maintain it now after the reboot.
This adds a bit of cost and components, is there a different way to achieve the same? I'm more on the software side, have less electronics knowledge. Any help is appreciated. Maybe it is similar to 1 bit memory which is set/reset by ESP-12, can I use a flip flop in this case?