 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);

  readTemp(ptr);
  readHum(ptr);
  readLum(ptr);
  
}
void readTemp(char* ptr){

  ptr[15] = 0xFF;

}

void readSwitch(char* ptr){
  ptr[12] = 0xFF;
  ptr[15] = switchStatus;

}

void readLamp(char* ptr){
  ptr[12] = 0xFF;
  ptr[15] = lampStatus;

}

void switchLight(char* ptr)
{
  lampStatus = ptr[16];
  if(lampStatus == 0xFF){
    digitalWrite(led, HIGH);
  }
  else{
    digitalWrite(led, LOW);
  }
  ptr[12] = 0xFF;
}

