You are reading a single comment by @Gordon and its replies. Click here to read the full conversation.
  • Hi,

    Thanks for letting us know - case sensitivity is actually an issue, so that code is wrong and I'll correct it. My guess is that when I wrote the code, the NRF24 was on the 'default' pins, so as MOSI/MISO/SCK would have been undefined, Espruino chose the correct (default) pins for SPI1 automatically.

    SPI is connected 'straight' - it's actually got a really nice naming convention. MOSI = Master Out Slave In, and obviously MISO is the opposite. Espruino is the Master and the NRF module is the slave.

    One way to help test is to make sure that you can communicate with the module over SPI. You could try asking it for its status, so you could do:

    var nrf = new NRF( D13, D12, D11, D1, D0, 4 ); 
    nrf.init([0,0,0,0,1], [0,0,0,0,2]); 
    nrf.getAddr(nrf.C.RX_ADDR_P1);
    

    and it should return an array representing the address - which should be [0,0,0,0,1] - the address that was given to the module in the init() function.

    Hope that helps!

About

Avatar for Gordon @Gordon started