It looks good to me. Do you have control over what's in the receiver, or is that someone else's?
The easiest thing by far for security is to make your remote non-connectable with NRF.setAdvertising({}, { connectable:false }); and maybe even disable the UART with NRF.setServices(undefined, { uart : false});.
Obviously that then means you wouldn't be able to connect to it to debug/do anything (you'd have to restart it with the button held down to get access). You could run the code in a timeout 30 seconds after boot to make it a bit easier I guess, or as it seems like even disconnecting the battery is tricky maybe you could make it so a really long press (30 sec?) of the button you added to D29 could re-enable it?
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.
It looks good to me. Do you have control over what's in the receiver, or is that someone else's?
The easiest thing by far for security is to make your remote non-connectable with
NRF.setAdvertising({}, { connectable:false });
and maybe even disable the UART withNRF.setServices(undefined, { uart : false});
.Obviously that then means you wouldn't be able to connect to it to debug/do anything (you'd have to restart it with the button held down to get access). You could run the code in a timeout 30 seconds after boot to make it a bit easier I guess, or as it seems like even disconnecting the battery is tricky maybe you could make it so a really long press (30 sec?) of the button you added to D29 could re-enable it?