Skip to content
  • MySensors
  • OpenHardware.io
  • Categories
  • Recent
  • Tags
  • Popular
Skins
  • Light
  • Brite
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Brand Logo
  1. Home
  2. Development
  3. interfacing NRF24L01+ and Leonardo !

interfacing NRF24L01+ and Leonardo !

Scheduled Pinned Locked Moved Development
2 Posts 2 Posters 765 Views 2 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • A Offline
    A Offline
    Ard8no
    wrote on last edited by mfalkvidd
    #1

    hi . Please Help a newbie !
    i have a problem with interfacing the NRF24L01+ module with Arduino Leonardo board !
    this nrf module works well with arduino UNO . the arduino can receive and send data ! ( MISO 12 , MOSI 11, SCK 13 )
    i tried different wiring methods . i tried like the UNO using the 11 12 13 digital pins of the leonardo , and didn't work .
    i also use the ICSP headers to connect the MOSI MISO SCK and it didn't work !
    CE/CSN to 9/10 , i also tried 8/10 ! nothing happened . the leonardo doesn't receive nothing !

    here is the code for the receiver board ( leonardo)

    #include <SPI.h>
    #include <nRF24L01.h>
    #include <RF24.h>
    RF24 radio(9, 10);   // nRF24L01 (CE, CSN)
    const byte address[6] = "00001";
    
    
    struct Data_Package {
      
      byte jaxisX;
      byte jaxisY;
      byte jButton;
      byte button1;
      byte button2;
      byte button3;
      byte button4;
      byte button5;
      byte button6;
      
    };
    Data_Package data; 
    
    void setup() {
      Serial.begin(9600);
      radio.begin();
      radio.openReadingPipe(0, address);
      radio.setAutoAck(false);
      radio.setDataRate(RF24_250KBPS);
      radio.setPALevel(RF24_PA_LOW);
      radio.startListening(); //  Set the module as receiver
     
    }
    void loop() {
     
      if (radio.available()) {
        radio.read(&data, sizeof(Data_Package));  
     Serial.print("data.jaxisX ");
      Serial.println(data.jaxisX);
      Serial.print("data.jaxisY ");
      Serial.println(data.jaxisY);
      Serial.print("data.jButton ");
      Serial.println(data.jButton);
      Serial.print("data.button1 ");
      Serial.println(data.button1);
      Serial.print("data.button2 ");
      Serial.println(data.button2);
      Serial.print("data.button3 ");
      Serial.println(data.button3);
      Serial.print("data.button4 ");
      Serial.println(data.button4);
      Serial.print("data.button5 ");
      Serial.println(data.button5);
      Serial.print("data.button6 ");
      Serial.println(data.button6);
      Serial.println("*************************");
      //delay(500);// to easly read the data in serial monitor
    }
    }
    

    and i use the wiring in this pic and the same module 0_1548075858338_rf24l01aleonardo.PNG

    1 Reply Last reply
    0
    • alowhumA Offline
      alowhumA Offline
      alowhum
      Plugin Developer
      wrote on last edited by
      #2

      You don't seem to be using MySensors?

      1 Reply Last reply
      0
      Reply
      • Reply as topic
      Log in to reply
      • Oldest to Newest
      • Newest to Oldest
      • Most Votes


      9

      Online

      11.7k

      Users

      11.2k

      Topics

      113.0k

      Posts


      Copyright 2019 TBD   |   Forum Guidelines   |   Privacy Policy   |   Terms of Service
      • Login

      • Don't have an account? Register

      • Login or register to search.
      • First post
        Last post
      0
      • MySensors
      • OpenHardware.io
      • Categories
      • Recent
      • Tags
      • Popular