I suggest NOT saving pin states; at least as a "by default" operation.
Connected devices often require a specific initialization sequence or in response to sensors which may not have been sampled yet (motor controllers, pumps etc.). Also pins which may be used in a bidirectional manner (eg. I2C, 1-Wire).
Espruino is a JavaScript interpreter for low-power Microcontrollers. This site is both a support community for Espruino and a place to share what you are working on.
I suggest NOT saving pin states; at least as a "by default" operation.
Connected devices often require a specific initialization sequence or in response to sensors which may not have been sampled yet (motor controllers, pumps etc.). Also pins which may be used in a bidirectional manner (eg. I2C, 1-Wire).