As you know, with a ff - fat finger - tapped in the center, both button 4 and 5 fire... so my suggestion for a lock / unlock is something like start/touch down on one side, swipe to the other side, stay there and then untouch... it is less than two seconds. If this is not unique enough, stay in the middle for a bit. That would be for sure a nice work. Even the emulation has the overlap for a while, so with the pointy finger - like the mouse - both buttons fire...
// ulockpoc.js - unlock/ lock proof of concept
function onInit() {
setWatch((e)=>LED1.write(e.state),BTN4,{repeat:true,edge:"both"});
setWatch((e)=>LED2.write(e.state),BTN5,{repeat:true,edge:"both"});
}
setTimeout(onInit,999);
Yu should see on touch down on the left (no buttons side), red LED1 comes on, moving/swiping slowly towards the right side (buttons side), green LED2 comes on, more moving/swiping red LED1 goes out, and on untouch, green LED2 goes out as well...
...OOOOPS.... the overlap - which I though have seen in an firmware update a bit ago - is not there...(anymore)...
@Gordon, did I misread the release notes of the touch detection areas for the emulation?
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.
As you know, with a ff - fat finger - tapped in the center, both button 4 and 5 fire... so my suggestion for a lock / unlock is something like start/touch down on one side, swipe to the other side, stay there and then untouch... it is less than two seconds. If this is not unique enough, stay in the middle for a bit. That would be for sure a nice work. Even the emulation has the overlap for a while, so with the pointy finger - like the mouse - both buttons fire...
Yu should see on touch down on the left (no buttons side), red LED1 comes on, moving/swiping slowly towards the right side (buttons side), green LED2 comes on, more moving/swiping red LED1 goes out, and on untouch, green LED2 goes out as well...
...OOOOPS.... the overlap - which I though have seen in an firmware update a bit ago - is not there...(anymore)...
@Gordon, did I misread the release notes of the touch detection areas for the emulation?