• I built a project a couple of years ago with Pico transmitter and Original board receiver using NRF24L01 radios. I upgraded firmware on both to 2v03 a few days ago and the radio link no longer works (I get TX not received XX errors). I have 10uf caps on both NRF modules. I can get the link to work by programming the Original as the transmitter and Pico as the receiver. I've tried swapping the radio modules + replacing them with some extras I have.

    I also tried using different output pins on the Pico to drive the CE and CSN signals, but still get the same results. I'm reasonably confident the SPI interface is working fine on both boards since I can read various registers on the NRF modules including the RX/TX addresses. I've tried different data rates and power levels. I'm running both boards connected to USB and the IDE. So far nothing has worked - I cannot get it to work with Pico as transmitter and Original as receiver. It always works the other way around.

    I've posted some test code below. I would really appreciate any suggestions!

    Pico Transmitter:

    SPI1.setup({sck:B3, miso:B4, mosi:B5});
    var nrf = require("NRF24L01P").connect( SPI1, B14, B13 );
    function onInit() {
      nrf.init([0,0,0,0,1], [0,0,0,0,2]);
    var on = false;
    var i = 0;
    setInterval(function() {
      var s = nrf.getStatus();
      digitalWrite(LED1, on);
      on = !on;
      if (i++ > 8) i = 0;
    }, 2000);

    Original Receiver:

    SPI1.setup({sck:A5, miso:A6, mosi:A7});
    var nrf = require("NRF24L01P").connect( SPI1, B0, B1 );
    function onInit() {
      nrf.init([0,0,0,0,2], [0,0,0,0,1]);
    dataLine = "";
    setInterval(function() {
      while (nrf.getDataPipe() !== undefined) {
        var data = nrf.getData();
        for (var i in data) {
          var ch = data[i];
          if (ch===0 && dataLine!=="") {
            dataLine = "";
          } else if (ch!==0) {
            dataLine += String.fromCharCode(ch);
    }, 50);
  • Tue 2019.06.11

    Hello @Allen, while I have no experience with this NRF24L01 packet radio, I do notice a possible area of contention. While your description is detailed and easily understood, to save the reader valuable time in assisting you, it would have been nice had the links to the documentation been included in your post.


    Looking at the commented sections in the source:


    reveals that C4 and C5 are assigned to _csn and _ce respectively.
    exports.connect = function(_spi, _csn, _ce, _payload)

    As I look over the Espruino Original image, C4 and C5 are ADC only.

    B0 and B1 share ADC with PWM.

    From Line #2 of the Pico code above, B14 and B13 share SPI2 with PWM only. Could it be that A0 and A1, or A5 and A6 should be used on the Pico instead?

    Perusing the source didn't reveal to me the pin type requirement for _csn and _ce, however.

  • Hi @Robin, whether the pins have ADC or PWM shouldn't affect their functionality as GPIO/SPI.

    Do you remember which firmware version you had that actually worked? It's possible that the Pico's JS interpreter has got faster, and that has broken something in the NRF24L01P transmit code that worked previously?

  • @Gordon, I wondered the same thing. I don't remember the previous version - I got the Pico over 2 years ago and never updated it, but it seems like it was 1v7x.
    I will experiment with the send method timing in the NRF module.

  • I just tried here with some I had kicking around on older firmwares (1.69/71/78) and upgraded them - and it does still seem to work for me when sending from the Pico using your code (albeit with the CSN/SE pins changed to how I had things wired).

    Does it work at all for you?

    I did manage to get a TX not received to start happening after a while, but unplugging/replugging fixed that for me (and I think that's the classic capacitor issue because I haven't installed any on mine).

    I was getting TX not received all the time and I thought I'd reproduced it, but it turned out I had the wrong IO pins set up :)

  • I hooked up a storage scope: the timing of CE and CSN signals and even the antenna output of the NRF chip look the same when comparing the Pico and Original boards as transmitters. The radio is definitely transmitting something from the Pico board.

    I'm starting to suspect the Original board as a receiver.

  • I bought a new Pico and everything works. I haven't figured out what's wrong with my old Pico yet, but 2v03 and the NRF24L01 driver are both fine.

  • Post a reply
    • Bold
    • Italics
    • Link
    • Image
    • List
    • Quote
    • code
    • Preview

NRF24L01 Pico to Original stopped working with 2v03

Posted by Avatar for Allen @Allen