I've started using different radio's now, not used nrf24l01's for a while, but when i did this is what i did
#include <Spi.h>
#include <mirf.h>
#include <nRF24L01.h>
int l=65; // Cant remember what this was
int ledPin = 8;
void setup()
{
// Serial.begin(9600);
pinMode(ledPin, OUTPUT);
Mirf.init();
Mirf.setRADDR((byte *)"clie1");
Mirf.payload = sizeof(int);
Mirf.config();
}
void loop()
{
// byte data[Mirf.payload];
Mirf.setTADDR((byte *)"serv1");
int temp = analogRead(0); // read analog 0
Mirf.send((byte *) &temp); // send the value
while(Mirf.isSending())
{
}
digitalWrite(ledPin, HIGH); // blip the led to say it's sent
delay(50);
digitalWrite(ledPin, LOW);
delay(950);
}