Also tested, my ranges are: x ∈ [0,191] y ∈ [0,189]
range_x = [50,50]; range_y = [50,50]; Bangle.on('touch', (button, xy) => { if (xy.x < range_x[0]) range_x[0] = xy.x; if (xy.x > range_x[1]) range_x[1] = xy.x; if (xy.y < range_y[0]) range_y[0] = xy.y; if (xy.y > range_y[1]) range_y[1] = xy.y; console.log("ranges are", range_x, range_y); });
@diego 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.
Also tested, my ranges are:
x ∈ [0,191]
y ∈ [0,189]