Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // Flame Sensor A0 Pin -> Arduino Pin
- int flameSensorPin = A0;
- // Variable/Box to put the new readings from the flame sensor into it
- int flameNumber = 0;
- void setup() {
- // Setting the Flame Pin as Input (this step is not necessary because the Arduino Analog pins are set as Input by default)
- pinMode(flameSensorPin, INPUT);
- // Starting a Serial communication between the computer and the Arduino to recieve the values of the flame detector
- Serial.begin(9600);
- }
- void loop() {
- // Reading the value of the detected Infrared wave from the Flame Sensor
- flameNumber = analogRead(flameSensorPin);
- // Printing the value of the detected Infrared wave to the computer's Serial Monitor
- Serial.println(flameNumber);
- delay(1000);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement