nRF24l01+ transceiver control LED

Hey,

I am new to Arduino programming. I just connected two Arduino Micros with one nRF24l01+ 2,4Ghz transceiver each using the Mirf Library… I used the following codes (from this website:Arduino Mega 2560 | Arduino Micro | nRF24L01+ | Hack-Wiki | Hard- und Softwarehacks):

Transmitter:

#include <SPI.h>
#include <Mirf.h>
#include <nRF24L01.h>
#include <MirfHardwareSpiDriver.h>
int rate=100;
int rate2 =1;
void setup(){ Serial.begin(9600);

Mirf.spi = &MirfHardwareSpi;
Mirf.init();
Mirf.setRADDR((byte *)“clie1”);
Mirf.payload = sizeof(rate);
Mirf.config();}
void loop()
{
rate = analogRead(A0);
Mirf.setTADDR((byte *)“serv1”);
Mirf.send((byte *) &rate);
while(Mirf.isSending()){}

}

Receiver:

#include <SPI.h>
#include <Mirf.h>
#include <nRF24L01.h>
#include <MirfHardwareSpiDriver.h>
#define analogOutpin 9
int rate;

void setup(){

Serial.begin(9600);

Mirf.spi = &MirfHardwareSpi;
Mirf.init();
Mirf.setRADDR((byte *)“serv1”);
Mirf.payload = sizeof(rate);
Mirf.config();
}

void loop(){
int led=6;
while(!Mirf.dataReady()){}
Mirf.getData((byte *) &rate);
Serial.println(rate):
delay(200);

}

The sketch is supposed to analogRead the Input of a potentiometer and print it on the serial monitor of the receiving nrf24l01… everything worked out…

Now i want to control the brightness of an LED using the input of the potentiometer (expressed by the integer “rate”)… i couldnt figure out how to do this. Do i have to convert the integer to binary to write it to the LED? I googled it but still have no clue how to do it…

Thankful for every help!

Go back and select Quick Edit-More, Modify
and update your post to use code tags </> on the menu.
That post is not workable as is. Surely you could tell that by looking at it?

Close - try again, change "quote" to "code" in the tags.