Created
October 24, 2014 08:20
-
-
Save AriPal/8943a8973342af2077af to your computer and use it in GitHub Desktop.
Sensor monitoring..
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
int ledPin1 = 6; // led red | |
int ledPin2 = 7; // blue | |
int Flame_Detector_Sensor; | |
int PIR_sensor; | |
void setup() | |
{ | |
Serial.begin(9600); // Communication rate | |
pinMode(ledPin1, OUTPUT); | |
pinMode(ledPin2, OUTPUT); | |
} | |
void loop() | |
{ | |
// Test Flame Sensor | |
Flame_Detector_Sensor = analogRead(A0); | |
// End Test of Flame Sensor | |
// Test PIR_Sensor | |
// PIR_sensor = digitalRead(A1); | |
//Serial.print(PIR_sensor); | |
//Serial.print("\t"); | |
Serial.print(Flame_Detector_Sensor); | |
Serial.println(); | |
// End Test of PIR Sensor | |
/* | |
if(Flame_Detector_Sensor <= 400){ | |
digitalWrite(ledPin1, HIGH); | |
} else { | |
digitalWrite(ledPin1, LOW); | |
} | |
*/ | |
delay(300); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment