I'm currently using the function getResetReason from ESP lib to distinguish between reboot reasons.
As far as I understand, it should return a different value in the 2 following cases:
- reset due to RST button pressed on nodeMCU board
- reset due to power on
But here is what I get:
1) power on due to USB cable plugged in NodeMCU board => reason is REASON_EXT_SYS_RST
2) power on due to 5V on Vin => reason is REASON_EXT_SYS_RST
3) power on due to RST button press ed => reason is REASON_EXT_SYS_RST
Is it the normal behaviour??
If yes, how can I distinguish between a "power on" boot and a "hard reset" boot?
Thanks guys!