The code by itself won't do it (if that's what you're trying?). You'd have to integrate it with the existing accelerometer app, copying it into the startRecord function to overwrite the existing accelHandler function: https://github.com/espruino/BangleApps/blob/master/apps/accellog/app.js
You'd also need to change the existing setWatch function from BTN2 to BTN3.
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.
The code by itself won't do it (if that's what you're trying?). You'd have to integrate it with the existing accelerometer app, copying it into the
startRecord
function to overwrite the existingaccelHandler
function: https://github.com/espruino/BangleApps/blob/master/apps/accellog/app.jsYou'd also need to change the existing setWatch function from BTN2 to BTN3.