Avatar for AkosLukacs


Member since Dec 2015 • Last active Oct 2019
  • 15 conversations

Most recent activity

  • in Porting to new Devices
    Avatar for AkosLukacs

    Small update: I think solved the pin naming issue.
    Created alternate pin names like it's done with the NodeMCU pins. For example you P1.09 can be accessed as P1.p09. I think better than doing all the math to add 9 and 32 :)

    Or does anyone have a better idea for pin naming? P1.09 sort-of worked, but the autocomplete reported all kinds of weird ascii characters as properties. Espruino doesn't like properties starting with numbers, so decided to go with p as 'pin' prefix...

    @tcpipchip did you solve your pin naming problem?

  • in Pico / Wifi / Original Espruino
    Avatar for AkosLukacs

    You have a typo in the first line: it should be var start = new Date(), not new Data() :)

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

    Ah, ok, that explains why I couldn't count 23 bytes on the screenshot :) My guess was the too large MTU somehow confused the Espruino.

    But one more "maybe": remove the console.log statements from the receiving, and print the first 4 packets after receiving is done. Sending that 20 byte DataView in that "nice" format takes several 7.5ms connection intervals. Maybe that interferes. But it's just a guess...

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

    Just tried creating my own characteristic + using notify:
    Works nicely, sending 4 byte notifications every 10ms seems to work fine.
    One huge benefit over using the Nordic Uart: the Nordic uart is still usable. I can connect to the same Puck with the Web Ide and my Web Bluetooth application at the same time!

    Edit: and on the browser side just receiving data at 100Hz doesn't create any extraordinary CPU usage. Actually I have dozens of tabs open in Vivaldi, and a couple in Chrome, and my laptop CPU clocks down to <1GHz and <10% CPU usage by Chrome :)

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

    IIRC, Espruino does only support 20 byte MTU size.
    There is some work done to increase the MTU size on the increased_mtu github branch, but don't know how stable is that.

  • in Pico / Wifi / Original Espruino
    Avatar for AkosLukacs

    The specs say "On-board 3.3v 250mA voltage regulator, accepts voltages from 3.5v to 16v" You can check out the schematics and board files

    Wasn't 100% sure about the pins, but Gordon said in an earlier post:

    The Pico itself will run direct from the car's 12v though (it'll do up
    to 16v, so fine while the engine is running too). Just connect it
    between the VBAT and GND pins (opposite sides of the board to each

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

    Looks like there was a build glitch.
    Totally untested, but you can try the attached build :)

  • in ESP32
    Avatar for AkosLukacs


    Just connecting to the AP, and then saving Wifi credentials with Wifi.save() was the best for me.
    Wifi tries to reconnect if disconnected from the AP without any explicit code. Connect and reconnect sometimes completes quickly, sometimes it takes longer. And this can mess if you have timed reconnects.

    Also, in the function

    function iw2(){
      if(wifi_stat !== "connected") {
        wifi_pre_mem = process.memory().free;
        print("WIFI disconnected: Reconecting...");
        Wifi.connect(wifi_options.ssid, {password: wifi_options.password});
        wifi_post_mem = process.memory().free;

    The status can be for example connecting, if the function runs just after a random disconnect, while the ESP is still trying to connect. Calling Wifi.connect() while connecting caused all kinds of strange behaviour for me.

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

    Something is not right with that too: did progress up to a point, opening the console revealed an exception (screenshots attached). Tried it in Edge and Chrome, same behaviour.

    But looks like the link you sent continues the DFU from the previous fail point.
    Sent you an email with wireshark captures.