Avatar for Gordon

Gordon

Member since Sep 2013 • Last active Feb 2018

Most recent activity

  • in Puck.js
    Avatar for Gordon

    Ahh, by Magnetventil, you mean 'solenoid valve'?

    You'd probably find that this is exactly what you're after: https://makezine.com/projects/use-puck-j­s-automate-your-gardening-tasks/

    Do you have a link to the impulse water meter you're considering getting?

    If the water meter is basically just a switch (with 2 wires), then you could connect one wire to GND, and the other wire to any free data pin on Puck.js.

    Then it's just a matter of:

    var meterPin = D1; // or whatever pin
    pinMode(meterPin,"input_pullup"); // this makes the pin a `1` unless the switch is on
    setWatch(function() {
      console.log("Impulse!");
    }, meterPin, {repeat:true,edge:"falling"});
    
  • in Porting to new Devices
    Avatar for Gordon

    Nice - thanks!

    There will definitely be an nRF52840 port because I'm planning on releasing an nRF52840-based board, and I'm aiming to bring Bluetooth Mesh to Espruino as well (even on nRF52832 devices like Puck.js).

    Actually getting that going on the Particle board should be trivial and I can provide some pointers, however I'm afraid I wouldn't be building/hosting firmwares myself for other people's hardware unless Particle were willing to help support it like Seeed/Ruuvitag/ST/etc do, so if you wanted custom builds you'd still have to do them yourself.

    It's a pain but it's just what I'm having to do now - since it's all open, what I build and host on Espruino.com is about the only leverage I've got to encourage companies to help support my work on it.

    Just to add, there's some very cool Nordic stuff just around the corner that I may well end up doing something with too. I think there's a good likelihood that LTE-M will roll out across a whole bunch of countries very quickly.

  • in General
    Avatar for Gordon

    Just managed to reproduce this - if you open the settings window and close it, it wipes out the data received from the board. So if you just connect and upload it'll be fine - it's just an issue if you connect, enter settings, and then upload.

    I'll fix it for the next IDE release.

  • in JavaScript
    Avatar for Gordon

    While this hasn't been posted on the forum yet, new (cutting edge, 1v96 and later when released) firmwares now have a nonvolatile Storage module:

    >s.write("config","Lalalala")
    =true
    >s.read("config")
    ="Lalalala"
    

    There will be some JSON support in there soon as well, but this should make everyone's life a lot easier.

  • in General
    Avatar for Gordon

    Great! I ask because I've been talking to Nordic and apparently there are some folks there that don't think Espruino is used in industry - it's nice to have a little ammunition when I next talk to them :)

    I've just boosted the amount of flash dedicated to saved code - there was no reason for it to be that small in nRF52, so if you use a new firmware from the travis builds you should find the amount of memory available for saving has gone from 12k to 40k.

    Hopefully newer firmwares will go a long way towards getting rid of 'MEMORY_BUSY' errors too.

    On the IDE front, I figured out the issue - there's some really weird scoping issue when loading the main.js file in NW.js which means that the utf8 library doesn't load properly. I've got a fix which I'll roll into a new IDE release today - there's just something else I'd like to get fixed first as well.

  • in ESP32
    Avatar for Gordon

    Thanks - let's figure this one out in the issue you filed on GitHub?
    https://github.com/espruino/Espruino/iss­ues/1346

  • in Puck.js
    Avatar for Gordon

    Great! The service data 0xCC00 looks a bit odd though.

    Do you have an up to date firmware on your device? I don't see that here when I run your code.

  • in Puck.js
    Avatar for Gordon

    Maybe you could try connecting to the bulb and getting the services and characteristics, and then keeping a reference to the characteristic variable. Next time you connect literally just connect and write to the characteristic.

    I know you say 'instant', but that's actually really speedy and might make things a lot easier for you.

    If power usage isn't a big deal then yes, I'd say use scanning for advertising packets - and then the 'middle' Puck can set its advertising data up to relay what it received to the second one. It should be pretty straightforward to implement, even with a continuous connection to the light bulb.

  • in Projects
    Avatar for Gordon

    As @Wilberforce says, take a look at the Multiple chained MAX7219 heading in the link above.

    Then, it's just a matter of something like:

    require("Font6x8").add(Graphics);
    var text = "Hello world with lots and lots of text";
    var x = 0;
    function scroll() {x--;
      if (x<-g.stringWidth(text)) x=g.getWidth();
      g.clear();
      g.drawString(text, x, 0);
      g.flip();
    }
    setInterval(scroll, 20);
    
  • in Other Boards
    Avatar for Gordon

    Just moved... But yes, it's great! Especially because they're actually doing it the same way Seeed, Ruuvitag (and soon some others) are - so I'll be providing up to date builds and getting started documentation on Espruino.com

Actions