Bangle js
Jump to navigation
Jump to search
Contents
some Features[edit]
- 1.3 inch 240x240 16 bit LCD
- 2 zone touch
- Vibration motor
- GPS receiver (UBlox)
- Heart rate monitor
- 3 Axis Accelerometer, 3 Axis Magnetometer
- 350mAh battery (1 week standby time)
- Nordic 64MHz nRF52832 ARM Cortex-M4
- Bluetooth LE
- 64kB RAM 512kB on-chip flash, 4MB external flash
- Waterproof (up to 10m)
- NO Wifi!
Bangle.js 1 & 2[edit]
this is an open source smart watch that can be easily programmed in java script.
Examples and Tutorials[edit]
- https://www.espruino.com/Quick+Start+Code
- https://www.espruino.com/Tutorials
- https://banglejs.com/apps/
- https://gist.github.com/rozek
Visualizing Acceleration data[edit]
Example from: https://github.com/espruino/BangleApps/blob/master/apps/accelgraph/app.js
1 Bangle.loadWidgets();
2 g.clear(1);
3 Bangle.drawWidgets();
4 var R = Bangle.appRect;
5
6 var x = 0;
7 var last;
8
9 function getY(v) {
10 return (R.y+R.y2 + v*R.h/2)/2;
11 }
12 Bangle.on('accel', a => {
13 g.reset();
14 if (last) {
15 g.setColor("#f00").drawLine(x-1,getY(last.x),x,getY(a.x));
16 g.setColor("#0f0").drawLine(x-1,getY(last.y),x,getY(a.y));
17 g.setColor("#00f").drawLine(x-1,getY(last.z),x,getY(a.z));
18 }
19 last = a;x++;
20 if (x>=g.getWidth()) {
21 x = 1;
22 g.clearRect(R);
23 }
24 });
Bangle.js IDE[edit]
There is a online IDE that uses Web-BLE to program the watch. There is no need for any local installation.
(Example show is a timer: https://www.espruino.com/Bangle.js+First+App)