Avatar for CriscoCrusader

CriscoCrusader

Member since Nov 2016 • Last active Jun 2017
  • 13 conversations
  • 56 comments

Most recent activity

    • 17 comments
    • 6,663 views
  • in JavaScript
    Avatar for CriscoCrusader

    @user75453, my mistake, I haven't tried your github code. I tried the code snippet you show in reply #21. I hope the fix makes it into the official Espruino MQTT module.

  • in JavaScript
    Avatar for CriscoCrusader

    @user75453, for example, you have

    var onConnect = function() {
    

    but onConnect is not referrenced anywhere else.

  • in JavaScript
    Avatar for CriscoCrusader

    @user75453, I did. I didn't have success. Are you sure you pasted valid JS? I recall a closing brace was missing, and some other issues which lead me to give up on that approach.

  • in JavaScript
    Avatar for CriscoCrusader

    I'm publishing the same topic over and over again, using the node mqtt module on my computer, and occasionally I'm getting incomplete data printed out in Espruino. I assume the Espruino MQTT code is to blame because the client matched on the topic, yet the output doesn't match.

    { 
      "topic": "sb_platform/v1/tes_16002b00", 
      "message": "100", 
      "dup": 0, "qos": 0, "retain": 0 }
    100
    Connection refused, unknown return code: 115.
    { 
      "topic": "sb_platform/v1/tes_16002b00", 
      "message": "100", 
      "dup": 0, "qos": 0, "retain": 0 }
    100
    { 
      "topic": "sb_platform/v1/tes_16002b00", 
      "message": "100", 
      "dup": 0, "qos": 0, "retain": 0 }
    100
    { 
      "topic": "sb_platform/v1/tes_16002b00", 
      "message": "100", 
      "dup": 0, "qos": 0, "retain": 0 }
    100
    MQTT unsupported packet type: 0
    [MQTT]0,27,115,98,95,112,108,97,116,102,­111,114,109,47,118,49,47,116,101,115,95,­49,54,48,48,50,98,48,48,49,48,48
    { 
      "topic": "sb_platform/v1/tes_16002b00", 
      "message": "10", 
      "dup": 0, "qos": 0, "retain": 0 }
    10
    { 
      "topic": "sb_platform/v1/tes_16002b00", 
      "message": "100", 
      "dup": 0, "qos": 0, "retain": 0 }
    100
    { 
      "topic": "sb_platform/v1/tes_16002b00", 
      "message": "100", 
      "dup": 0, "qos": 0, "retain": 0 }
    100
    { 
      "topic": "sb_plat", 
      "message": "", 
      "dup": 0, "qos": 0, "retain": 0 }
    
    MQTT unsupported packet type: 6
    [MQTT]102,111,114,109,47,118,49,47,116,1­01,115,95,49,54,48,48,50,98,48,48,103,11­1
    
    • 4 comments
    • 3,007 views
  • in General
    Avatar for CriscoCrusader

    My bad. I've used that before, I think it's quite good, and I see these functions are there too. I'm really sleep deprived, that will be my excuse. Sorry for being a nuisance :). Thanks as always.

  • in General
    Avatar for CriscoCrusader

    I didn't know it has that feature! Trying it now, but seem to be having troubles.

    Using first port, {"path":"/dev/cu.usbmodem1421","usb":[11­55,22336],"description":"Espruino board"}
    Connecting to '/dev/cu.usbmodem1421'
    Connected
    Espruino.Core.Utils.getURL: got HTTP status code 404 for http://www.espruino.com/modules/NetworkJ­S.min.js
    Espruino.Core.Utils.getURL: got HTTP status code 404 for http://www.espruino.com/modules/net.min.­js
    Espruino.Core.Utils.getURL: got HTTP status code 404 for http://www.espruino.com/modules/net.js
    Module net not found
    Espruino.Core.Utils.getURL: got HTTP status code 404 for http://www.espruino.com/modules/NetworkJ­S.js
    Module NetworkJS not found
    

    I'll probably figure out why this happens. I see these same messages sometimes in the IDE, but it's fixed if I reset();save();.

  • in General
    Avatar for CriscoCrusader

    To get into the bootloader you just power the board up with the button held down - does that not work?

    It does not appear to be working. What does the yellow LED mean?

    For modules that have to be loaded off the internet you have to use the right-hand side of the IDE so the IDE can detect their use and load them automatically. The left-hand side goes direct to the Espruino Board, so if it doesn't know about a module it's unable to load it.

    Ya, see how it works now.

    It'd be worth going through the quick start and a few of the Espruino Pico tutorials - I think a lot of this stuff is covered already there - it might save you some time :)

    I did when I got my first board. I saw the section about save and onInit at the time, but I didn't try it out, and I forgot those features existed. I don't learn well by reading, I learn by doing, which is apparently uncommon among developers. FWIW, the Lodash project documentation is really easy to work with. Would be super if Espruino could have similar documentation at some point in the future.

Actions