 const uint64_t pipes[2] = { 0xF0F0F0F001LL, 0xF0F0F0F002LL };
 const byte shortAddr = 0x02;
 int led = 13;
+char switchStatus = 0;
+char lampStatus = 0;
 void setup(void)
 {
   Serial.begin(57600);
 
   radio.begin();
-  //radio.setChannel(0x4b);
   radio.setAutoAck(false);
   radio.setRetries(15,15);
   radio.setPALevel(RF24_PA_MAX);

      bool done = false;
      while (!done)
      {
        done = radio.read( ptr, sizeof(byte[32]) );
        Serial.println(ptr[1]);
	// Delay just a little bit to let the other unit
	// make the transition to receiver
	delay(20);
      }
      runCommand(ptr);
      Serial.println(ptr[3]);
      radio.stopListening();
      radio.write(ptr, sizeof(byte[32]));
      radio.startListening();
    }

}
bool runCommand(byte *ptr)
{
  Serial.println(ptr[1]);
  Serial.println(ptr[2]);
  Serial.println(ptr[3]);
  switch (ptr[1])
  {
    case 0:
      break;
    case 1:
      if (ptr[3]== 0x00)
      {
        switchOnLight(ptr);
      }
      break;
    case 2:
      if (ptr[3]== 0x00)
      {
        switchOffLight(ptr);
      }
      break;
  }

}

byte readTemp(void){}
byte readHum(void){}
byte readLight(void){}
bool switchOnLight(byte* ptr)
{
  digitalWrite(led, HIGH);
  ptr[3] = 0xFF;
}
bool switchOffLight(byte* ptr){
  digitalWrite(led, LOW);
  ptr[3] = 0xFF;
}


void loop(void)
{
  char command[32] ;
  char *ptr;
  ptr = &command[0];
  if ( radio.available() )
    {
