Avatar for yngv126399

yngv126399

Member since Mar 2021 • Last active Aug 2022
  • 8 conversations
  • 111 comments

Most recent activity

  • in Porting to new Devices
    Avatar for yngv126399

    Burned how?

  • in Porting to new Devices
    Avatar for yngv126399

    @fanoush figured out the issue. The display driver uses D9, which is an NFC pin for the nrf52832. Solution was covered in another conversation as a temporary measure, and to compile the firmware with the special tag ('DEFINES += -DCONFIG_NFCT_PINS_AS_GPIOS',) to let the NFC tags be treated as normal GPIOs.

  • in Porting to new Devices
    Avatar for yngv126399

    I'm hoping some folks here with more experience can give me some direction here. I have an nrf52832 smartwatch that I have ported Espruino to, and the core runs fine. I used some Espruino tools and a multimeter to figure out what pins are used on the display cable. I verified those by checking the GPIO setup and state while running the original firmware (using openocd to dump 0x50000700 and SPIM2). I believe I have CLK,MOSI,DC,CS,RST correct, and I am 99% sure it's a GC9A01 since my test code lights up both the SN80 and GW32 watches (both GC9A01). But my code does not work on this board. I figured there may be an ENable pin, so i walked through EVERY remaining pin: setting, resetting, pulling up/down before initializing and still get nothing. The backlight is on but I get no other visuals (even on other boards, if you get the pins right you see something: static, blurred pixels...).

    My question: is there anything else a GC9A01 (or any small display controller) may need just to fire up? Something like special timings for the RST (right now I'm pulsing it with 50ms in between, then waiting 120ms before initialization).?

    Any input or direction would be greatly appreciated... it would be nice to have Espruino fully running on this. Thanks.

  • in General
    Avatar for yngv126399

    wish I could "like" this message.... oh! wait.....

  • in Projects
    Avatar for yngv126399

    This is a boutique "oddity" gift. There's a market for that....

    • 3 comments
    • 277 views
  • in Puck.js, Pixl.js and MDBT42
    Avatar for yngv126399

    Maybe I could even have a wifi-connection in it.
    Well, there goes your battery! ;-) Actually I think the Puck would be perfect for this. Press the button to start BLE, download to phone, back to low power data collection. And adding the humidity sensor shouldn't affect the footprint.

  • in Bangle.js
    Avatar for yngv126399

    I've narrowed down a bug to when I use Esprima's Mangle to shorten variable names (other minification options don't generate the error).

    I'm seeing an error in the Bangle emulator when I execute this:

    // works fine
    g.clear();
    
    function dothis() {
      g.clear();
    }
    
    function test(one, two, three, four, five) {
      let arrTmp = 0; //new Uint8Array(12);
      for(let i=0; i<1; i++) {}
      
      // fails
      g.clear();
      dothis();
    }
    
    test();
    

    I'm getting this error:

    >Uncaught Error: Function "clear" not found!
     at line 1 col 23
    let a=0;for(let g=0;g<1;g++);g.clear(),dothis()
                                   ^
    in function "test" called from line 1 col 92
    ...(),dothis()}g.clear(),test()
                                  ^
    

    You can see that it changed the loop variable to 'g' , which should still be a local variable, but it clearly affects Bangle's 'g'.

    However, if you do any one of the following, the error goes away and the Bangle 'g' is fine:

    • if you comment out g.clear() and use the "dothis()" function instead
    • if you comment out the "let arrTmp" assignment
    • if you comment out the empty for loop
    • if you reduce the argument list to 4 items

    Just thought I'd share; not sure whether this is an Esprima bug, or an interpreter bug (a "let g=" within a for loop should be its own scope and not interfere with global context?)

  • in Bangle.js
    Avatar for yngv126399

    you'll need a buffer for each moving part (which could eat a lot of memory on Bangle1), set timeouts to loop through each "frame", calculating coordinates to copy from buffer to the lcd, and you may see some lag & jitter as you're asking the little cpu to do a lot of work (assuming Bangle1 again).

    Bangle2 is more capable of this and could probably handle the ones you've shared fine. which watch are you targeting?

Actions