Hi im struggling with my project for school.
I found great tutorial about communication between arduino and phone app here:
but there is one problem.
These messages are sent by click. How to make it so that the app itself scans if the sensor has detected a fire and that this message is sent as a notification/alert to phone.
CODE
////////////////////////////////////////////////////////////////////////////
char Option = 0;
Option = Serial.read();
Flame_Sensor_Reading = analogRead(Analog_Flame_Sensor_Pin);
if(Flame_Sensor_Reading>300)
{
digitalWrite(FLAME_LED,HIGH);
Option = "F";
Serial.println("Flame detected");
}
else
{
digitalWrite(FLAME_LED,LOW);
Option = "C";
Serial.println("Clear");
}
////////////////////////////////////////////////////////////////////////////
I tried also this tutorial, but unfortunetly I ended up with displaying every serial line printed in monitor, not only this one placed in if statement.
Any hints? Thanks.