Hardware.wakereason() - return values

The wiki gives the following list but it’s not in number sequence. The integer return values are as follows.

0 WAKEREASON_POWER_ON
2 WAKEREASON_SW_RESET
1 WAKEREASON_TIMER
3 WAKEREASON_PIN1
4 WAKEREASON_NEW_SQUIRREL

I generally try to avoid using integer values in place of enums (as one of the points of enums is to abstract the value in case it changes).

That said, there are some useful thing you can do when you know the integer values for the enums - I’ll update our wiki page to reflect this.

Agreed but I’m sure there others like me who just plonk stuff in to test & explore.