You are reading a single comment by @Cale and its replies. Click here to read the full conversation.
  • Master Handler

    SPI1.setup({sck:B3, miso:B4, mosi:B5});
    var nrf = require("NRF24L01P").connect(SPI1, B6, B7);
    function onInit() {
      nrf.init([0,0,0,0,2], [0,0,0,0,1]);
    }
    onInit();
    
    setInterval(function() {
      nrf.masterHandler();
    }, 50);
    
    function send(command){
      nrf.sendCommand(command, function(r) {       
        print("=="+r); 
      });
    }
    

    Response is:

    >send('one')
    =undefined
    ==one on and volts 0.05297932402
    >send('two')
    =undefined
    > 
    
About

Avatar for Cale @Cale started