You are reading a single comment by @Gordon and its replies. Click here to read the full conversation.
  • The current algorithm for turning Bangle.js's screen on really isn't that good. Basically I just try and see if it's face up.

    I've been experimenting with different algorithms - for example trying to detect sudden acceleration from twisting the wrist.

    Maybe some of you could check this out and see what you think? It doesn't light up but should buzz when it would light the screen up. Any suggestions?

    var ctr = 0;
    
    Bangle.on('accel',o=>{
      g.scroll(0,-1);
      g.setPixel(120-50, 239, "#808080");
      g.setPixel(120+50, 239, "#808080");
      g.setPixel(120+o.x*100, 239, "#ff0000");
      g.setPixel(120+o.y*100, 239, "#00ff00");
      g.setPixel(120+o.z*100, 239, "#0000ff");
      g.flip();
      ctr++;
      if (o.y>0.45) ctr=0;
      if (o.y<-0.2 && ctr<10) {
        Bangle.buzz();
        ctr=100;
      }
    });
    
About

Avatar for Gordon @Gordon started