Avatar for ryan42

ryan42

Member since Dec 2016 • Last active May 2021
  • 4 conversations
  • 10 comments

Most recent activity

  • in Puck.js, Pixl.js and MDBT42
    Avatar for ryan42

    Sorry @Gordon, has been a busy few weeks.

    I'll try with setSleepIndicator(LED1) and see if that can narrow it down a little bit. I'll try with the current build 2V00 first and then see if there is any difference with the cutting edge. Previously I was on 1V97 I think so I can also try rolling back to that.

    Cheers
    Ryan

    • 6 comments
    • 2,915 views
  • in Puck.js, Pixl.js and MDBT42
    Avatar for ryan42

    Hi all,

    Has anyone had any issues with their Puck draining the battery super quickly? I have one that has been running for 2 weeks and is still on 100% and another that went flat in about 5 days? Both were running v200 and I have just put a cutting edge build on and noticed it has used 8% in the last hour an a half. The last three batteries have all been brand new from the packet. Same batch as the one in the unit still at 100%

    The code running isn't complicated. It's mostly just an IR remote I send commands too but get it to report temperature and battery voltage too. I have also checked D28 and D29 with .getMode() and they report input so I assume the serial port isn't on and keeping it awake?

    var tvOn = [1,1,1];
    var tvOff = [1,1,1];
    var tvToggle = [1,1,1];
    
    function onInit() {
        //start up and flash the lights in order...
        LED1.set();
        setTimeout(function() {
          LED1.reset();
          LED2.set();
          setTimeout(function() {
            LED2.reset();
            LED3.set();
            setTimeout(function() {
              LED3.reset();
            },300);
          },300);
        },300);
        setInterval(function() {
          NRF.setAdvertising({
            0x180F : [Puck.getBatteryPercentage()],
            0x1809 : [E.getTemperature()]
          },{interval:5000});
        },15*60*1000);
    }
    

    Cheers,
    Ryan

    • 11 comments
    • 3,452 views
  • in Other Boards
    Avatar for ryan42

    Hi jbgagnon,

    Yes that did it! Thanks for that.

    @Gordon I do have that backtrace if you’d like it but I guess it’s all good?

    Now for a 14 hour flight back to Australia, at least I can keep myself entertained.

    Cheers!

  • in Other Boards
    Avatar for ryan42

    Hi Gordon,

    Thanks for that. See below. I had to run bt before continue as seemed to exit and provide no info, only No stack. Hopefully this is what you're after.

    (gdb) start
    Temporary breakpoint 2 at 0x806abc7: file targets/linux/main.c, line 252.
    Starting program: /usr/local/bin/espruino
    [Thread debugging using libthread_db enabled]
    Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1­".
    
    Temporary breakpoint 2, main (argc=1, argv=0x7ffffffde3a8) at targets/linux/main.c:252
    252       int i, args = 0;
    (gdb) bt
    #0  main (argc=1, argv=0x7ffffffde3a8) at targets/linux/main.c:252
    (gdb) continue
    Continuing.
    Interactive mode.
    Size of JsVar is now 32 bytes
    Size of JsVarRef is now 4 bytes
    Added SIGINT hook
    Added SIGHUP hook
    Added SIGTERM hook
    [New Thread 0x7ffffe570700 (LWP 12967)]
    ASSERT(strlen(name)<=8) FAILED AT src/jsflash.c:56
      #1[r1,l2] Object {
        #2[r1,l2] Name String [1 blocks] "\xFF"      #3[r1,l1] Object {
            #6[r1,l2] Name String [1 blocks] "timers"          #7[r2,l0] Array(0) [ ]
            #8[r1,l2] Name String [1 blocks] "watches"          #9[r2,l0] Array(0) [ ]
          }
      }
    EXITING.
    [Thread 0x7fffff7b0740 (LWP 12966) exited]
    [Inferior 1 (process 12966) exited with code 01]
    (gdb) q
    

    Cheers

  • in Other Boards
    Avatar for ryan42

    Hi,

    I was wondering if anyone has tried to compile Espruino on Windows Subsystem for Linux?

    I have a few long flights from Europe back to Australia and I thought it would be great to be able to continue testing some things I'm working on for my Picos but on Windows 10? I should have bought a Pico with me and then I could just use that but only thought about this project while I have been away.

    So far I have got Debian installed with WSL. I have installed all the required build tools, cloned from git and then make. Everything looks ok. Then I try run Espruino and I get the following...

    Interactive mode.
    Size of JsVar is now 32 bytes
    Size of JsVarRef is now 4 bytes
    Added SIGINT hook
    Added SIGHUP hook
    Added SIGTERM hook
    ASSERT(strlen(name)<=8) FAILED AT src/jsflash.c:56
      #1[r1,l2] Object {
        #2[r1,l2] Name String [1 blocks] "\xFF"      #3[r1,l1] Object {
            #6[r1,l2] Name String [1 blocks] "timers"          #7[r2,l0] Array(0) [ ]
            #8[r1,l2] Name String [1 blocks] "watches"          #9[r2,l0] Array(0) [ ]
          }
      }
    EXITING.
    

    I had a look at jsflash.c but I'll admit its a bit over my head.

    Anybody else tried this? Is it even possible?

    Cheers
    Ryan

  • in Puck.js, Pixl.js and MDBT42
    Avatar for ryan42

    Ah right, cheers. I had a feeling that might have been it but I’ve got it in a hard to access location so I thought I’d ask first.
    I’ve been using the external adapter because I seem to get a better range with it vs the internal Bluetooth.
    Thanks for the heads up.

  • in Puck.js, Pixl.js and MDBT42
    Avatar for ryan42

    G'day everyone,

    Just wondering if anyone has come across this error before while trying to connect from the WebIDE?

    I can see the PuckJS but am unable to connect. The following is from the Pi status page served from the EspruinoHub.
    I have also just updated the EspruinoHub and WebIDE running on the Pi as well as my PuckJS to 1V95.

    Connected
     Bleno State poweredOn
     Bleno.startAdvertising Success
     Bleno.setServices Success
     Starting scan...
     Scanning started.
     Tue Feb 20 2018 20:05:10 GMT+1100 (AEDT) Connection accepted.
     Websocket MQTT connected
     /ble/notify/puckController/nus/nus_rx => "\"\""
     Scanning stopped.
     /ble/ping/puckController => "\"\""
     e7:bc:6c:91:xx:xx: Connecting...
     e7:bc:6c:91:xx:xx: Error Connecting: Error: Command Disallowed (0xc)
     Scanning started.
     Scanning stopped.
     e7:bc:6c:91:xx:xx: Connecting...
     e7:bc:6c:91:xx:xx: Error Connecting: Error: Command Disallowed (0xc)
     Scanning started.
     /ble/ping/puckController => "\"\""
    

    I'm using an RPi3 with external an bluetooth adaptor and the WebIDE from another linux machine.

    Until now I have just been using the EspruinoHub with Node-Red for some control based on clicks but since the WebIDE was added it would be a great way to reprogram them too.

    Any help would be great.

    Cheers
    Ryan

Actions