Agora | And YOU can Help Fight Fires!

Alexandria

Team Updates

This is the Agora app
This is the Agora app
m
mohsen mohamed

Report of Agora Team:

Hey challenge accepted in Firefighting.

It’s a really big problem that happen all over the world.

The main problem:

That the people die by the fire and building's damage.

We think about this problem by alarming people who near by the fire and show the safe road to go.

Our project separated to two parts hardware and software

Hardware: is consists of arduino, Wi-Fi device and fire sensor.

Software: is an android and java with server in php and SQLite for database.

The idea:

That Carried out by sensors put on different places, when sensor sense a fire it send this signal to server that we made by Wi-Fi device and arduino,

Then server will receive this signal and send it to clients and show firing place coordinates using our mobile app (agora application)

Mobile app idea (agora application):

  • We use Google maps in our app and GPS find your location.
  • We select android platform because it easy as starting and if this success we will made to different platforms.
  • We made a server to receive data from sensor and send it to app.
  • App contains two department, one to all client (people) who has app

, Second to admin of the fire station,

  • They will receive more data about the fire as time, date for fire and the duration of fire
  • We will calculate the duration via receiving two different series signal.
  • assume someone is near by the fire and he hasn't or forget the phone in somewhere , data will send to monitors which be in the streets it will be show the same data on the phone and show safe streets .
  • admin (firemen ) in app can guide people via app or big monitor in the street

This is the Agora app:

The sensor circuit with arduino:

This code for arduino :

/********************

- www.geekstips.com

- Arduino Time Sync from NTP Server using ESP8266 WiFi module

- Arduino code example

********************/

#include <ESP8266WiFi.h>

#include <WiFiUdp.h>

#include<SoftwareSerial.h>

int store1,store2;

int sensor =A0;

char ssid[] = "Agora"; // your network SSID (name)

char pass[] = "Agora13"; // your network password

unsigned int localPort = 2390; // local port to listen for UDP packets

IPAddress timeServerIP;

const char* ntpServerName = "time.nist.gov";

const int NTP_PACKET_SIZE = 48;

byte packetBuffer[ NTP_PACKET_SIZE];

WiFiUDP udp;

void setup()

{

Serial.begin(115200);

WiFi.begin(ssid, pass);

while (WiFi.status() != WL_CONNECTED) {

delay(500);

}

udp.begin(localPort);

pinMode (3,OUTPUT);

pinMode (5,OUTPUT);

pinMode (8,OUTPUT);

pinMode (10,INPUT);

}

void loop()

{

store1=analogRead(sensor);

store2=digitalRead(10);

delay(250);

Serial.println(store1);

Serial.println("Agora");

Serial.println(store2);

if (store1<= 50 || store2==HIGH)

{

digitalWrite (3,HIGH) ;

digitalWrite (5,HIGH);

digitalWrite (8,LOW);

}

else

{

digitalWrite (3,LOW) ;

The code for android:

package com.example2017.android.maps;

import android.support.v4.app.FragmentActivity;

import android.os.Bundle;

import com.google.android.gms.maps.CameraUpdateFactory;

import com.google.android.gms.maps.GoogleMap;

import com.google.android.gms.maps.OnMapReadyCallback;

import com.google.android.gms.maps.SupportMapFragment;

import com.google.android.gms.maps.model.BitmapDescriptor;

import com.google.android.gms.maps.model.BitmapDescriptorFactory;

import com.google.android.gms.maps.model.LatLng;

import com.google.android.gms.maps.model.MarkerOptions;

public class MapsActivity extends FragmentActivity implements OnMapReadyCallback {

private GoogleMap mMap;

@Override

protected void onCreate(Bundle savedInstanceState) {

super.onCreate(savedInstanceState);

setContentView(R.layout.activity_maps);

// Obtain the SupportMapFragment and get notified when the map is ready to be used.

SupportMapFragment mapFragment = (SupportMapFragment) getSupportFragmentManager()

.findFragmentById(R.id.map);

mapFragment.getMapAsync(this);

}

/**

* Manipulates the map once available.

* This callback is triggered when the map is ready to be used.

* This is where we can add markers or lines, add listeners or move the camera. In this case,

* we just add a marker near Sydney, Australia.

* If Google Play services is not installed on the device, the user will be prompted to install

* it inside the SupportMapFragment. This method will only be triggered once the user has

* installed Google Play services and returned to the app.

*/

@Override

public void onMapReady(GoogleMap googleMap) {

mMap = googleMap;

// Add a marker in Sydney and move the camera

LatLng sydney = new LatLng(31.308376, 30.065867);

mMap.addMarker(new MarkerOptions().position(new LatLng( 31.311135, 30.066349)).title("Warning fire is here ")).setIcon(BitmapDescriptorFactory.fromResource(R.drawable.fire4));

mMap.addMarker(new MarkerOptions().position(new LatLng( 31.309898, 30.065813 )).title("Warning fire is here "));

mMap.moveCamera(CameraUpdateFactory.newLatLngZoom(sydney,13));

}

}

m
mohsen mohamed
NASA Logo

SpaceApps is a NASA incubator innovation program.