#define IR_MOVEMENT_PIN 9
#define ONE_WIRE_PIN 8
#define PANIC_BUTTON_PIN 7
+#define PHOTO_ANALOGPIN 1
//movement is reported if during IR_SAMPLE_DURATION at least IR_TRESHOLD ir signals are detectd
#define IR_SAMPLE_DURATION 20000
#define IR_TRESHOLD 13000
//********************************************************************//
+void printLightLevel(unsigned int pin)
+{
+ Serial.print("Photo: ");
+ Serial.println(analogRead(pin));
+}
+
+//********************************************************************//
+
void setup()
{
pinMode(RF_DATA_OUT_PIN, OUTPUT);
send_frame(words[D2_OFF]);
else if(command == 'T')
printTemperature(onShieldTemp);
+ else if(command == 'P')
+ printLightLevel(PHOTO_ANALOGPIN);
else
Serial.println("Error: unknown command");