You are reading a single comment by @Cale and its replies. Click here to read the full conversation.
  • Not sure if this is to do with the update as I had not used the NRF24L01+ before. But when I call it from the PICO as in the example it errors back with "masterHbndler" not found.

    SPI1.setup({sck:A5, miso:A6, mosi:A7});
    var nrf = require("NRF24L01P").connect( SPI1, B10, B1 );
    function onInit() {
      nrf.init([0,0,0,0,2], [0,0,0,0,1]);
    }
    onInit();
    setInterval(function() {
      nrf.masterHandler();
    }, 50);
    

    returns

    in function called from system
    Uncaught Error: Function "masterHbndler" not found!
     at line 1 col 6
    {nrf.masterHbndler();}
          ^
    

    BUT when I run the code like this....

    SPI1.setup({sck:A5, miso:A6, mosi:A7});
    var nrf = require("NRF24L01P").connect( SPI1, B10, B1 );
    function onInit() {
      nrf.init([0,0,0,0,2], [0,0,0,0,1]);
    }
    onInit();
    function interval(){
      nrf.masterHandler();
    }
    setInterval(interval, 50);
    

    it works........

About

Avatar for Cale @Cale started