Go Down

Topic: nRF24L01.h library with multiple nodes possible? (Read 680 times) previous topic - next topic

0miker0

The Arduino Playground nRF24L01.h library at  http://playground.arduino.cc/InterfacingWithHardware/Nrf24L01 is very easy to use and for me it's working great. I'm using it to transmit the temperature of one device to a receiver.
http://youtu.be/8RJMrisngwY?list=UUXpjUx31kBU96EtzbuK0xkQ
I have made up a few more temperature sensor transmitters a would like to view all three on the one receiver's display. I'm not sure if there is an easy way to do it with this library. I've seen other libraries but they are very complex compared to this one.
A piece of my receiver code is something like this.

Code: [Select]

  Wire.begin();
  init_OLED();
  reset_display();           // Clear logo and load saved mode


  Mirf.spi = &MirfHardwareSpi;
  Mirf.init();
  Mirf.setRADDR((byte *)"serv1");
  Mirf.payload = sizeof(temp);
  Mirf.config();
}

void loop()
{
  //Wire.begin();
  int x=9;
 
  while(!Mirf.dataReady())
  {
  }
 
  Mirf.getData((byte *) &temp);  //byte
  Serial.println(temp);
 
  //print menu header
  display.setTextSize(2);
  display.setTextColor(WHITE);
  display.setCursor(30,10);
  display.println("Temp:");
 
  display.setTextSize(3); 
  display.setTextColor(WHITE);
  display.setCursor(8,35);  //over,up
  display.print(rate); 


Go Up