You are reading a single comment by @FransM and its replies. Click here to read the full conversation.
  • I'm writing a small app for my bangle to allow scrolling through a list of items (e.g. navigation directions, but this could apply to shopping lists as well).
    For that I am looking for a way to upload the directions file (or shopping list).
    Is that possible?

    Below is a simplified example, but that one uses a static array.
    I know how to read the info from a file, but it is not clear to me what the best way is to upload the file.

    (BTW: I also considered a small generator that creates a dedicated app, but I feel that is more cumbersome).

    Thanks, Frans

    PS: and pardon me if this is the wrong forum, but I felt none of the forums was really applicable.

    const vals = [
      "",
      "1st left", 
      "2nd right",
      "cross railroad",
      "stop at #17",
      ""
    ];
    
    
    let ix = 1;
    
    function draw()
    {
      g.clear();
      g.setFontVector(20);
      //g.setColor(passivColor);
      g.setFontAlign(0, -1, 0);
      g.drawString(vals[ix-1], 120, 0);
      g.drawString(vals[ix+1], 120, 200);
      g.setFontVector(30);
      g.drawString(vals[ix], 120, 100);
    }
    
    function next() {
      if (ix < vals.length - 2) ix = ix + 1;
      draw();
    }
    function prev() {
      if (ix > 1)  ix = ix - 1;
      draw();
    }
    
    setWatch(next, BTN5, { repeat: true });
    setWatch(prev, BTN4, { repeat: true });
    
    draw();
    
About

Avatar for FransM @FransM started