Android app Github link
ABC Technology
Bangladesh
Category :Spot that fire
OUR SYSTEM INCLUDED WITH
1: Hardware:-
A: IOT based hardware for wildfire detection for city area
B: NRF/RF mesh network for wildfire detection in remote area
2 Software :-
A: WEB
B: Android App
C: Data Science :
A:Neural network
B:Big Data
RESOURCE
1: NASA Fire information and resource management https://firms.modaps.eosdis.nasa.gov/web-services/
2: NASA Incidence information system https://inciweb.nwcg.gov/
3: GOOGLE firebase
4: Google Map
FEATURE
1:Real-time wildfire monitoring
2:Data verification
3: Human and machine integration
4:Notify community rapidly
5: Learning platform for smart phone users to use this app
END
#include <ESP8266WiFi.h> | |
#include <FirebaseArduino.h> | |
// Set these to run example. | |
#define FIREBASE_HOST "nasa2018-77e29.firebaseio.com" | |
#define FIREBASE_AUTH "8rwBzWLyLGo3Hs7HBNRM6KMbOvMPt5pJideg3Kjy" | |
#define WIFI_SSID "Robot1" | |
#define WIFI_PASSWORD "121121121" | |
#define flamePin 8 | |
#define smokePin A0 | |
void setup() { | |
Serial.begin(9600); | |
Serial.println("Stuck in setup"); | |
pinMode(A0,INPUT); | |
pinMode(flamePin,INPUT); | |
pinMode(smokePin,INPUT); | |
// connect to wifi. | |
WiFi.begin(WIFI_SSID, WIFI_PASSWORD); | |
Serial.print("connecting"); | |
while (WiFi.status() != WL_CONNECTED) { | |
Serial.print("."); | |
delay(500); | |
} | |
Serial.println(); | |
Serial.print("connected: "); | |
Serial.println(WiFi.localIP()); | |
Firebase.begin(FIREBASE_HOST, FIREBASE_AUTH); | |
} | |
int n = 0; | |
int flame; | |
int smoke; | |
void pushData(){ | |
Firebase.setString("/devices/device1/smoke",(String)flame); | |
if (Firebase.failed()) { | |
Serial.print("setting /number failed:"); | |
Serial.println(Firebase.error()); | |
return; | |
} | |
delay(1000); | |
Firebase.setString("/devices/device1/fire", (String)smoke); | |
if (Firebase.failed()) { | |
Serial.print("setting /number failed:"); | |
Serial.println(Firebase.error()); | |
return; | |
} | |
delay(1000); | |
} | |
void sensorData(){ | |
flame = analogRead(A0); | |
smoke = analogRead(A0); | |
Serial.print("Flame = "); | |
Serial.print(flame); | |
Serial.print("Smoke = "); | |
Serial.print(smoke); | |
Serial.println(); | |
delay(200); | |
} | |
void loop() { | |
Serial.println("i'm in loop"); | |
sensorData(); | |
pushData(); | |
} | |
// set value | |
#include <Firebase.h> | |
#include <FirebaseArduino.h> | |
#include <FirebaseCloudMessaging.h> | |
#include <FirebaseError.h> | |
#include <FirebaseHttpClient.h> | |
#include <FirebaseObject.h> | |
#include "DHT.h" | |
#include <ESP8266WiFi.h> | |
//#include <FirebaseArduino.h> | |
#define DHTPIN 3 | |
#define DHTTYPE DHT22 | |
#define FIREBASE_HOST "test-503b7.firebaseio.com/" | |
#define FIREBASE_AUTH "OdRVfO4CwfiJ9R2ZfvmaeeZiKZo9ZiLVJBLe1We3" | |
#define WIFI_SSID "Robot" | |
#define WIFI_PASSWORD "121121121" | |
DHT dht(DHTPIN, DHTTYPE); | |
// | |
//// Set these to run example. | |
//#define FIREBASE_HOST "nasa2018-77e29.firebaseio.com" | |
//#define FIREBASE_AUTH "8rwBzWLyLGo3Hs7HBNRM6KMbOvMPt5pJideg3Kjy" | |
//#define WIFI_SSID "Robot" | |
//#define WIFI_PASSWORD "121121121" | |
void setup() { | |
Serial.begin(9600); | |
dht.begin(); | |
// connect to wifi. | |
WiFi.begin(WIFI_SSID, WIFI_PASSWORD); | |
Serial.print("connecting"); | |
while (WiFi.status() != WL_CONNECTED) { | |
Serial.print("."); | |
delay(500); | |
} | |
Serial.println(); | |
Serial.print("connected: "); | |
Serial.println(WiFi.localIP()); | |
Firebase.begin(FIREBASE_HOST, FIREBASE_AUTH); | |
} | |
int n = 0; | |
void loop() { | |
// set value | |
float h = dht.readHumidity(); | |
float t = dht.readTemperature(); | |
float f = dht.readTemperature(true); | |
if (isnan(h) || isnan(t) || isnan(f)) { | |
Serial.println("Failed to read from DHT sensor!"); | |
return; | |
} | |
float hif = dht.computeHeatIndex(f, h); | |
float hic = dht.computeHeatIndex(t, h, false); | |
Firebase.setFloat("Humidity",h); | |
// handle error | |
if (Firebase.failed()) { | |
Serial.print("setting /number failed:"); | |
Serial.println(Firebase.error()); | |
return; | |
} | |
delay(1000); | |
// update value | |
Firebase.setFloat("Temperature", t); | |
// handle error | |
if (Firebase.failed()) { | |
Serial.print("setting /number failed:"); | |
Serial.println(Firebase.error()); | |
return; | |
} | |
delay(1000); | |
// get value | |
Serial.print("number: "); | |
Serial.println(Firebase.getFloat("Humidity")); | |
delay(1000); | |
Serial.print("number: "); | |
Serial.println(Firebase.getFloat("Temperature")); | |
delay(1000); | |
// remove value | |
Firebase.remove("number"); | |
delay(1000); | |
// set string value | |
Firebase.setString("message", "hello world"); | |
// handle error | |
if (Firebase.failed()) { | |
Serial.print("setting /message failed:"); | |
Serial.println(Firebase.error()); | |
return; | |
} | |
delay(1000); | |
// set bool value | |
Firebase.setBool("truth", false); | |
// handle error | |
if (Firebase.failed()) { | |
Serial.print("setting /truth failed:"); | |
Serial.println(Firebase.error()); | |
return; | |
} | |
delay(1000); | |
// append a new value to /logs | |
String name = Firebase.pushInt("logs", n++); | |
// handle error | |
if (Firebase.failed()) { | |
Serial.print("pushing /logs failed:"); | |
Serial.println(Firebase.error()); | |
return; | |
} | |
Serial.print("pushed: /logs/"); | |
Serial.println(name); | |
delay(1000); | |
} |
SpaceApps is a NASA incubator innovation program.