Avatar for Andreas

Andreas

Member since Apr 2014 • Last active Aug 2014
  • 4 conversations
  • 11 comments

Most recent activity

  • in General
    Avatar for Andreas

    Hi Espruinos,

    The title says it all, is it possible to call a function on NRF24 TX not received event?

    Thanks & Regards, Andreas

    • 3 comments
    • 2,363 views
  • in General
    Avatar for Andreas

    Hi Gordon,
    Thanks a lot for your support! It works just fine now. I'm very happy about all the espruino updates and improvements - I really love that thing :)

    Best Regards, Andreas

  • in General
    Avatar for Andreas

    Hi Espruinos,

    Since I have updated my Espruinos to 1v67 my NRF does not "answer" anymore.
    To verify I have checked the examples from https://github.com/espruino/EspruinoDocsĀ­/blob/master/devices/NRF24L01P.md :

    This works, the green LED can be set via NRF:

    nrf.sendCommand("LED2.set()", function(r) { print("=="+r); });
    =undefined
    

    But 1+2 will return "=undefined" instead of 3:

    nrf.sendCommand("1+2", function(r) { print("=="+r); });
    =undefined
    

    Different to the eaxmple my setup looks like this:

    SPI3.setup({sck:B3, miso:B4, mosi:B5});
    var nrf = require("NRF24L01P").connect( SPI3, A0, A1 );
    
    function onInit() {
    calibrate();
    }
    
    setInterval(function() {
      nrf.masterHandler();
    }, 50);
    

    Does anyone has faced this issue too?

    Thanks & Regards, Andreas

  • in JavaScript
    Avatar for Andreas

    Hi there,
    For everyone who is also missing the replace function... It took a while for me to find a workaround but one way is to do .split("Arduino") what gives you an array. Than you can loop through this array and add "Espruino" in each loop except the last.
    Best Regards, Andreas

  • in General
    Avatar for Andreas

    Hi Gordon,

    Thanks again! It works absolutely fine now. I'm very new in hardware programming and the espruino is really great and a lot of fun to work with!

    Best regards, Andreas

  • in General
    Avatar for Andreas

    Hi Espruinos!

    In my application I would like to use four buttons C2, C3, C4 and C5.

    The question is, what is the best way to set up these buttons? I tried

    function onInit() {
       //Set the buttons to 0
      C2.write(0);
      C3.write(0);
      C4.write(0);
      C5.write(0);
    }
    
    setWatch(function() {
      l = l + 1;
    }, C5, { repeat: true, edge: "falling", debounce:100});
    
    setWatch(function() {
      m = m + 1;
    }, C4, { repeat: true, edge: "falling", debounce:100});
    
    setWatch(function() {
      n = n + 1;
    }, C3, { repeat: true, edge: "falling", debounce:100});
    
    setWatch(function() {
      o = o + 1;
    }, C2, { repeat: true, edge: "falling", debounce:100});
    

    Each of the buttons is connected to V_bat on the one side and to C2,3,4 or 5 on the other side. But when I press a button (let's say the one connected with C2), the variable "o" does not increase when I press it the first time, when I press it again it jumps from 0 to 2, then it works and jumps from 2 to 3 and so on but with no reproducibly.
    I just want to increase by 1 when a button is pressed.

    Thanks a lot, Andreas

  • in General
    Avatar for Andreas

    Hi Gordon,

    I'm using the espruino in combination with a current clamp and log the data to the SD Card. Espruino is my first hardware but it's really fun to work with it, absolutely fantastic! I run out of memory a few times when I do a lot of samples (around 5000 measurements) but as you mentioned this can be fixed when the memory is used more efficiently. I'm looking forward to get more espruino, thanks a lot for the development!

Actions