With your suggestions above, I've got a working solution :
Bangle.setOptions({wakeOnTouch:true}); Bangle.on("touch", function(b, xy) { console.log("main - touch",b,xy, Bangle.isLocked()); });
But it looks like, when in locked state, I have to tap twice - not a 'double tap', but tap - wait - tap :
____ _ | __|___ ___ ___ _ _|_|___ ___ | __|_ -| . | _| | | | | . | |____|___| _|_| |___|_|_|_|___| |_| espruino.com 2v10.89 (c) 2021 G.Williams > >Bangle.isLocked() =true // Tap // No response <============ // Tap // Response main - touch 2 { "x": 91, "y": 77, "type": 0 } false // Tap // Response main - touch 1 { "x": 58, "y": 112, "type": 0 } false // Tap // Response main - touch 1 { "x": 62, "y": 110, "type": 0 } false // // Wait until locked // // Tap // No response <============ // Tap // Response main - touch 2 { "x": 90, "y": 76, "type": 0 } false // Tap // Response main - touch 2 { "x": 92, "y": 78, "type": 0 } false >
Or is this normal behavior ?
@jgw started
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.
With your suggestions above, I've got a working solution :
But it looks like, when in locked state, I have to tap twice - not a 'double tap', but tap - wait - tap :
Or is this normal behavior ?