├── .github └── FUNDING.yml ├── simple-buzzar └── simple-buzzar.ino ├── Email-Function-ESP8266 └── Email-Function-ESP8266.ino ├── On-BUTTON-Press-LED-Turns-ON └── On-BUTTON-Press-LED-Turns-ON.ino ├── LICENSE ├── On-Press-LED-Remains-ON-or-OFF └── On-Press-LED-Remains-ON-or-OFF.ino ├── Device-2_READFROM-CLOUD-BUZZAR-beep └── Device-2_READFROM-CLOUD-BUZZAR-beep.ino ├── GPS-6M-NEO-Location-Function └── GPS-6M-NEO-Location-Function.ino ├── GPS-PushButton-LED-EmailAlert.CPP ├── Device-1_GPSDATA-CLOUD-EMAILALERT-LEDSTATUS └── Device-1_GPSDATA-CLOUD-EMAILALERT-LEDSTATUS.ino └── README.md /.github/FUNDING.yml: -------------------------------------------------------------------------------- 1 | # These are supported funding model platforms 2 | 3 | github: rakshixh 4 | buy_me_a_coffee: rakshixh 5 | -------------------------------------------------------------------------------- /simple-buzzar/simple-buzzar.ino: -------------------------------------------------------------------------------- 1 | void setup() 2 | { 3 | 4 | } 5 | 6 | void loop() 7 | { 8 | tone(14, 494, 500); 9 | delay(1000); 10 | } 11 | -------------------------------------------------------------------------------- /Email-Function-ESP8266/Email-Function-ESP8266.ino: -------------------------------------------------------------------------------- 1 | EMailSender emailSend("123@hotmail.in", " "); 2 | EMailSender::EMailMessage message; 3 | message.subject = " "; 4 | message.message = " "; 5 | EMailSender::Response resp = emailSend.send("123@gmail.com", message); 6 | Serial.println("Sending status: "); 7 | Serial.println(resp.code); 8 | Serial.println(resp.desc); 9 | Serial.println(resp.status); 10 | -------------------------------------------------------------------------------- /On-BUTTON-Press-LED-Turns-ON/On-BUTTON-Press-LED-Turns-ON.ino: -------------------------------------------------------------------------------- 1 | int ledpin = 5; // D1(gpio5) 2 | int button = 4; //D2(gpio4) 3 | int buttonState=0; 4 | void setup() { 5 | pinMode(ledpin, OUTPUT); 6 | pinMode(button, INPUT); 7 | } 8 | void loop() { 9 | buttonState=digitalRead(button); // put your main code here, to run repeatedly: 10 | if (buttonState == 1) 11 | { 12 | digitalWrite(ledpin, HIGH); 13 | delay(200); 14 | } 15 | if (buttonState==0) 16 | { 17 | digitalWrite(ledpin, LOW); 18 | delay(200); 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2024 Rakshith Acharya 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /On-Press-LED-Remains-ON-or-OFF/On-Press-LED-Remains-ON-or-OFF.ino: -------------------------------------------------------------------------------- 1 | //When pressed led remains on 2 | 3 | #define LED 5 // D1(gpio5) 4 | #define BUTTON 4 //D2(gpio4 5 | 6 | //Let's say you have your push button on pin 4 7 | int switchState = 0; // actual read value from pin4 8 | int oldSwitchState = 0; // last read value from pin4 9 | int lightsOn = 0; // is the switch on = 1 or off = 0 10 | 11 | void setup() 12 | { 13 | pinMode(BUTTON, INPUT); // push button 14 | pinMode(LED, OUTPUT); // anything you want to control using a switch e.g. a Led 15 | } 16 | void loop() 17 | { 18 | switchState = digitalRead(BUTTON); // read the pushButton State 19 | if (switchState != oldSwitchState) // catch change 20 | { 21 | oldSwitchState = switchState; 22 | if (switchState == HIGH) 23 | { 24 | // toggle 25 | lightsOn = !lightsOn; 26 | } 27 | } 28 | if(lightsOn) 29 | { 30 | digitalWrite(LED, HIGH); // set the LED on 31 | } 32 | else 33 | { 34 | digitalWrite(LED, LOW); // set the LED off 35 | } 36 | } 37 | -------------------------------------------------------------------------------- /Device-2_READFROM-CLOUD-BUZZAR-beep/Device-2_READFROM-CLOUD-BUZZAR-beep.ino: -------------------------------------------------------------------------------- 1 | #include "ThingSpeak.h" 2 | #include 3 | 4 | const char* ssid = " "; //enter wifi name 5 | const char* password = " "; //enter wifi passsword 6 | 7 | //ThingSpeak Channel Details 8 | unsigned long myChannelNumber = ; //enter thingspeak channel number 9 | const char * myReadAPIKey = " "; //enter thingspeak read API Key 10 | const int FieldNumber3 = 3; 11 | WiFiClient client; 12 | 13 | int LastStatus=0; 14 | int frequency=1000; // in Hz 15 | int buzzPin=D5; 16 | int timeOn=1000; // in milliseconds 17 | int timeOff=1000; // in millisecods 18 | 19 | 20 | void setup() 21 | { 22 | Serial.begin(9600); 23 | 24 | Serial.print("Connecting to "); 25 | Serial.println(ssid); 26 | WiFi.begin(ssid, password); 27 | 28 | while (WiFi.status() != WL_CONNECTED) 29 | { 30 | delay(500); 31 | Serial.print("."); 32 | } 33 | 34 | Serial.println(""); 35 | Serial.println("WiFi connected"); 36 | Serial.println("IP address: "); 37 | Serial.println(WiFi.localIP()); 38 | Serial.print("Netmask: "); 39 | Serial.println(WiFi.subnetMask()); 40 | Serial.print("Gateway: "); 41 | Serial.println(WiFi.gatewayIP()); 42 | ThingSpeak.begin(client); 43 | 44 | } 45 | 46 | void loop() 47 | { 48 | long ledStatus = ThingSpeak.readLongField(myChannelNumber, FieldNumber3, myReadAPIKey); 49 | LastStatus = ThingSpeak.getLastReadStatus(); 50 | if (ledStatus == 1) 51 | { 52 | tone(buzzPin, frequency); 53 | delay(timeOn); 54 | noTone(buzzPin); 55 | delay(timeOff); 56 | Serial.print("LED IS ON \n"); 57 | } 58 | else 59 | { 60 | Serial.print("LED IS OFF \n"); 61 | } 62 | 63 | } 64 | -------------------------------------------------------------------------------- /GPS-6M-NEO-Location-Function/GPS-6M-NEO-Location-Function.ino: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | #include 4 | #include "ThingSpeak.h" 5 | #include 6 | 7 | static const int RXPin = 12 , TXPin = 13; 8 | static const uint32_t GPSBaud = 9600; 9 | const char* ssid = " "; 10 | const char* password = " "; 11 | unsigned long myChannelNumber = ; //enter thingspeak channel number 12 | const char * myWriteAPIKey = " "; //enter thingspeak write API Key 13 | 14 | TinyGPSPlus gps; 15 | WiFiClient client; 16 | SoftwareSerial ss(RXPin, TXPin); 17 | 18 | void setup() 19 | { 20 | Serial.begin(9600); 21 | ss.begin(GPSBaud); 22 | Serial.println(F("DeviceExample.ino")); 23 | Serial.println(F("A simple demonstration of TinyGPS++ with an attached GPS module")); 24 | Serial.print(F("Testing TinyGPS++ library v. ")); 25 | Serial.println(TinyGPSPlus::libraryVersion()); 26 | Serial.println(); 27 | 28 | Serial.print("Connecting to "); 29 | Serial.println(ssid); 30 | WiFi.begin(ssid, password); 31 | while (WiFi.status() != WL_CONNECTED) 32 | { 33 | delay(500); 34 | Serial.print("."); 35 | } 36 | Serial.println(""); 37 | Serial.println("WiFi connected"); 38 | Serial.println("IP address: "); 39 | Serial.println(WiFi.localIP()); 40 | Serial.print("Netmask: "); 41 | Serial.println(WiFi.subnetMask()); 42 | Serial.print("Gateway: "); 43 | Serial.println(WiFi.gatewayIP()); 44 | ThingSpeak.begin(client); 45 | } 46 | 47 | void loop() 48 | { 49 | while (ss.available() > 0) 50 | if (gps.encode(ss.read())) 51 | displayInfo(); 52 | 53 | if (millis() > 5000 && gps.charsProcessed() < 10) 54 | { 55 | Serial.println(F("No GPS detected: check wiring.")); 56 | while(true); 57 | } 58 | 59 | } 60 | void displayInfo() 61 | { 62 | if (gps.location.isValid()) 63 | { 64 | 65 | double latitude = (gps.location.lat()); 66 | double longitude = (gps.location.lng()); 67 | 68 | String latbuf; 69 | latbuf += (String(latitude, 6)); 70 | Serial.println(latbuf); 71 | 72 | String lonbuf; 73 | lonbuf += (String(longitude, 6)); 74 | Serial.println(lonbuf); 75 | 76 | ThingSpeak.setField(1, latbuf); 77 | ThingSpeak.setField(2, lonbuf); 78 | ThingSpeak.writeFields(myChannelNumber, myWriteAPIKey); 79 | delay(20000); 80 | 81 | } 82 | else 83 | { 84 | Serial.print(F("INVALID")); 85 | } 86 | 87 | Serial.print(F(" \n Date/Time: ")); 88 | if (gps.date.isValid()) 89 | { 90 | Serial.print(gps.date.month()); 91 | Serial.print(F("/")); 92 | Serial.print(gps.date.day()); 93 | Serial.print(F("/")); 94 | Serial.print(gps.date.year()); 95 | } 96 | else 97 | { 98 | Serial.print(F("INVALID")); 99 | } 100 | 101 | Serial.print(F(" ")); 102 | if (gps.time.isValid()) 103 | { 104 | if (gps.time.hour() < 10) Serial.print(F("0")); 105 | Serial.print(gps.time.hour()); 106 | Serial.print(F(":")); 107 | if (gps.time.minute() < 10) Serial.print(F("0")); 108 | Serial.print(gps.time.minute()); 109 | Serial.print(F(":")); 110 | if (gps.time.second() < 10) Serial.print(F("0")); 111 | Serial.print(gps.time.second()); 112 | Serial.print(F(".")); 113 | if (gps.time.centisecond() < 10) Serial.print(F("0")); 114 | Serial.print(gps.time.centisecond()); 115 | } 116 | else 117 | { 118 | Serial.print(F("INVALID")); 119 | } 120 | Serial.println(); 121 | } 122 | -------------------------------------------------------------------------------- /GPS-PushButton-LED-EmailAlert.CPP: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | #include 4 | #include "ThingSpeak.h" 5 | #include 6 | 7 | static const int RXPin = 12 , TXPin = 13; 8 | static const uint32_t GPSBaud = 9600; 9 | const char* ssid = " "; //enter wifi name 10 | const char* password = " "; //enter wifi password 11 | unsigned long myChannelNumber = ; //enter thingspeak channel number 12 | const char * myWriteAPIKey = " "; //enter thingspeak API KEY 13 | 14 | int ledpin = 5; 15 | int button = 4; 16 | int buttonState=0; 17 | 18 | TinyGPSPlus gps; 19 | WiFiClient client; 20 | SoftwareSerial ss(RXPin, TXPin); 21 | 22 | void setup() 23 | { 24 | Serial.begin(9600); 25 | ss.begin(GPSBaud); 26 | Serial.println(F("DeviceExample.ino")); 27 | Serial.println(F("A simple demonstration of TinyGPS++ with an attached GPS module")); 28 | Serial.print(F("Testing TinyGPS++ library v. ")); 29 | Serial.println(TinyGPSPlus::libraryVersion()); 30 | Serial.println(); 31 | 32 | Serial.print("Connecting to "); 33 | Serial.println(ssid); 34 | WiFi.begin(ssid, password); 35 | while (WiFi.status() != WL_CONNECTED) 36 | { 37 | delay(500); 38 | Serial.print("."); 39 | } 40 | Serial.println(""); 41 | Serial.println("WiFi connected"); 42 | Serial.println("IP address: "); 43 | Serial.println(WiFi.localIP()); 44 | Serial.print("Netmask: "); 45 | Serial.println(WiFi.subnetMask()); 46 | Serial.print("Gateway: "); 47 | Serial.println(WiFi.gatewayIP()); 48 | ThingSpeak.begin(client); 49 | 50 | pinMode(ledpin, OUTPUT); 51 | pinMode(button, INPUT); 52 | } 53 | 54 | void loop() 55 | { 56 | while (ss.available() > 0) 57 | 58 | if (gps.encode(ss.read())) 59 | displayInfo(); 60 | 61 | if (millis() > 5000 && gps.charsProcessed() < 10) 62 | { 63 | Serial.println(F("No GPS detected: check wiring.")); 64 | while(true); 65 | } 66 | 67 | buttonState=digitalRead(button); // put your main code here, to run repeatedly: 68 | if (buttonState == 1) 69 | { 70 | digitalWrite(ledpin, HIGH); 71 | EMailSender emailSend(" ", " "); //enter email address and password of that email account respectively 72 | EMailSender::EMailMessage message; 73 | message.subject = "Danger Alert !!!HELP!!!"; 74 | message.message = "Danger!!!
Go save her!!"; 75 | EMailSender::Response resp = emailSend.send(" ", message); //enter email address to which you want email alert to be send 76 | Serial.println("Sending status: "); 77 | Serial.println(resp.code); 78 | Serial.println(resp.desc); 79 | Serial.println(resp.status); 80 | 81 | } 82 | if (buttonState==0) 83 | { 84 | digitalWrite(ledpin, LOW); 85 | 86 | } 87 | 88 | } 89 | void displayInfo() 90 | { 91 | if (gps.location.isValid()) 92 | { 93 | 94 | double latitude = (gps.location.lat()); 95 | double longitude = (gps.location.lng()); 96 | 97 | String latbuf; 98 | latbuf += (String(latitude, 6)); 99 | Serial.println(latbuf); 100 | 101 | String lonbuf; 102 | lonbuf += (String(longitude, 6)); 103 | Serial.println(lonbuf); 104 | 105 | ThingSpeak.setField(1, latbuf); 106 | ThingSpeak.setField(2, lonbuf); 107 | ThingSpeak.writeFields(myChannelNumber, myWriteAPIKey); 108 | delay(20000); 109 | 110 | } 111 | else 112 | { 113 | Serial.print(F("INVALID")); 114 | } 115 | 116 | Serial.print(F(" \n Date/Time: ")); 117 | if (gps.date.isValid()) 118 | { 119 | Serial.print(gps.date.month()); 120 | Serial.print(F("/")); 121 | Serial.print(gps.date.day()); 122 | Serial.print(F("/")); 123 | Serial.print(gps.date.year()); 124 | } 125 | else 126 | { 127 | Serial.print(F("INVALID")); 128 | } 129 | 130 | Serial.print(F(" ")); 131 | if (gps.time.isValid()) 132 | { 133 | if (gps.time.hour() < 10) Serial.print(F("0")); 134 | Serial.print(gps.time.hour()); 135 | Serial.print(F(":")); 136 | if (gps.time.minute() < 10) Serial.print(F("0")); 137 | Serial.print(gps.time.minute()); 138 | Serial.print(F(":")); 139 | if (gps.time.second() < 10) Serial.print(F("0")); 140 | Serial.print(gps.time.second()); 141 | Serial.print(F(".")); 142 | if (gps.time.centisecond() < 10) Serial.print(F("0")); 143 | Serial.print(gps.time.centisecond()); 144 | } 145 | else 146 | { 147 | Serial.print(F("INVALID")); 148 | } 149 | Serial.println(); 150 | } 151 | -------------------------------------------------------------------------------- /Device-1_GPSDATA-CLOUD-EMAILALERT-LEDSTATUS/Device-1_GPSDATA-CLOUD-EMAILALERT-LEDSTATUS.ino: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | #include 4 | #include "ThingSpeak.h" 5 | #include 6 | 7 | //GPS PIN initializing 8 | static const int RXPin = 12 , TXPin = 13; 9 | static const uint32_t GPSBaud = 9600; 10 | 11 | //Password Details 12 | const char* ssid = " "; //enter wifi name 13 | const char* password = " "; //enter wifi password 14 | 15 | //ThingSpeak Channel Details 16 | unsigned long myChannelNumber = ; //enter thingspeak Channel Number 17 | const char * myWriteAPIKey = " "; //enter thingspeak write API Key 18 | 19 | //Button & LED Initializing 20 | int LEDpin = 5; 21 | int button = 4; 22 | int buttonState = 0; 23 | int ledState = 0; 24 | 25 | TinyGPSPlus gps; 26 | WiFiClient client; 27 | SoftwareSerial ss(RXPin, TXPin); 28 | 29 | void setup() 30 | { 31 | Serial.begin(9600); 32 | ss.begin(GPSBaud); 33 | Serial.println(F("DeviceExample.ino")); 34 | Serial.println(F("A simple demonstration of TinyGPS++ with an attached GPS module")); 35 | Serial.print(F("Testing TinyGPS++ library v. ")); 36 | Serial.println(TinyGPSPlus::libraryVersion()); 37 | Serial.println(); 38 | 39 | Serial.print("Connecting to "); 40 | Serial.println(ssid); 41 | WiFi.begin(ssid, password); 42 | 43 | while (WiFi.status() != WL_CONNECTED) 44 | { 45 | delay(500); 46 | Serial.print("."); 47 | } 48 | 49 | Serial.println(""); 50 | Serial.println("WiFi connected"); 51 | Serial.println("IP address: "); 52 | Serial.println(WiFi.localIP()); 53 | Serial.print("Netmask: "); 54 | Serial.println(WiFi.subnetMask()); 55 | Serial.print("Gateway: "); 56 | Serial.println(WiFi.gatewayIP()); 57 | ThingSpeak.begin(client); 58 | 59 | //Setting up LED & Button 60 | pinMode(LEDpin, OUTPUT); 61 | digitalWrite(LEDpin, LOW); 62 | pinMode(button, INPUT); 63 | } 64 | 65 | void loop() 66 | { 67 | while (ss.available() > 0) 68 | { 69 | if (gps.encode(ss.read())) 70 | displayInfo(); 71 | if (millis() > 5000 && gps.charsProcessed() < 10) 72 | { 73 | Serial.println(F("No GPS detected: check wiring.")); 74 | while(true); 75 | } 76 | } 77 | 78 | buttonState=digitalRead(button); 79 | if (buttonState == 1) 80 | { 81 | digitalWrite(LEDpin, HIGH); 82 | delay(10000); 83 | 84 | //EMAIL FUNCTION 85 | 86 | EMailSender emailSend(" /*enter your email here*/ ", " /*enter your email account password*/ "); 87 | EMailSender::EMailMessage message; 88 | message.subject = " /*enter the subject of email message*/ "; 89 | message.message = " /*enter the message of the email*/ "; 90 | EMailSender::Response resp = emailSend.send(" /*enter the email address to which you wanna send emailMessage to*/ ", message); 91 | Serial.println("Sending status: "); 92 | Serial.println(resp.code); 93 | Serial.println(resp.desc); 94 | Serial.println(resp.status); 95 | } 96 | 97 | if (buttonState==0) 98 | { 99 | digitalWrite(LEDpin, LOW); 100 | } 101 | 102 | displayLED(); 103 | } 104 | 105 | void displayInfo() 106 | { 107 | if (gps.location.isValid()) 108 | { 109 | double latitude = (gps.location.lat()); 110 | double longitude = (gps.location.lng()); 111 | 112 | String latbuf; 113 | latbuf += (String(latitude, 6)); 114 | Serial.println(latbuf); 115 | 116 | String lonbuf; 117 | lonbuf += (String(longitude, 6)); 118 | Serial.println(lonbuf); 119 | 120 | //Write the sensor data to the channel field1 & field2 with delay of 20s 121 | ThingSpeak.setField(1, latbuf); 122 | ThingSpeak.setField(2, lonbuf); 123 | ThingSpeak.writeFields(myChannelNumber, myWriteAPIKey); 124 | delay(20000); 125 | 126 | } 127 | else 128 | { 129 | Serial.print(F("INVALID")); 130 | } 131 | Serial.print(F(" \n Date/Time: ")); 132 | if (gps.date.isValid()) 133 | { 134 | Serial.print(gps.date.month()); 135 | Serial.print(F("/")); 136 | Serial.print(gps.date.day()); 137 | Serial.print(F("/")); 138 | Serial.print(gps.date.year()); 139 | } 140 | else 141 | { 142 | Serial.print(F("INVALID")); 143 | } 144 | Serial.print(F(" ")); 145 | if (gps.time.isValid()) 146 | { 147 | if (gps.time.hour() < 10) Serial.print(F("0")); 148 | Serial.print(gps.time.hour()); 149 | Serial.print(F(":")); 150 | if (gps.time.minute() < 10) Serial.print(F("0")); 151 | Serial.print(gps.time.minute()); 152 | Serial.print(F(":")); 153 | if (gps.time.second() < 10) Serial.print(F("0")); 154 | Serial.print(gps.time.second()); 155 | Serial.print(F(".")); 156 | if (gps.time.centisecond() < 10) Serial.print(F("0")); 157 | Serial.print(gps.time.centisecond()); 158 | } 159 | else 160 | { 161 | Serial.print(F("INVALID")); 162 | } 163 | Serial.println(); 164 | } 165 | 166 | void displayLED() 167 | { 168 | ledState = digitalRead(LEDpin); 169 | ThingSpeak.setField(3, ledState); 170 | ThingSpeak.writeFields(myChannelNumber, myWriteAPIKey); 171 | 172 | } 173 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Samraksh: IoT Based Women Safety Device 2 | 3 | ### Abstract 4 | * Despite the fact that our country is a powerhouse with a developing economy, it nevertheless has a number of crimes against women. 5 | * To address this big issue, we offer "Samraksh" as a solution. 6 | * This is a safety mechanism designed exclusively for women who are in difficulties, stress, etc. 7 | * Our system contains GPS Module, ESP8266, LED, Thingspeak Cloud service, Button & Beep Buzzar. 8 | * When a person is in distress, she must hit the button on the system provided. 9 | * The location of the device is determined in terms of longitude & latitude along with date and time. Then this data is sent to the Real-Time Cloud Service. 10 | * Now trusted person/family can access the location by copy-pasting that longitude & latitude into the Google Map followed by "," as soon as they are alerted by our system. 11 | 12 | ### Introduction 13 | * Safety being one of the most concerning issues, it is necessary to find an efficient way to ensure the safety of the people and the society. 14 | * Women's safety is considered to be one of the most critical issues in a country like India, where the rate of crime is thought to be higher than the pace of population increase. 15 | * NCRB states that as many as 39 crimes are reported every hour in the country. This adverse crime situation has embedded fear in the mind of people. If statistics are to be seen, around 20,532 cases are registered every year. 16 | * We come across many headlines reporting cases of molestation, trafficking, ill-treatment, ragging, kidnapping, missing and etc. 17 | * After identifying a hazard, existing handheld gadgets for human protection require human safety, such as pressing a button. 18 | 19 | ### Objectives 20 | * To build a safety device for women. 21 | * To facilitate quick action and hence reduce the harm. 22 | * To ensure the security of woman in the society and hence to promote Woman Empowerment. 23 | 24 | ### Problem Statement 25 | * Among all of the heinous crimes that have been witnessed recently, ensuring the safety of women has become a challenge, and thus a major source of concern in society. 26 | 27 | ### Methodology 28 | * The system comprises of two devices: Device 1 & Device 2, where Device 1 will be with the individual whose position is to be tracked, and Device 2 will be with a trustworthy person or family member, and this device will notify using a beeping buzzer. 29 | * The system includes a NEO 6M-GPS Module, as well as an LED, a push button, and a buzzer. 30 | * When the push button is pressed LED turns on for indication purposes and an email is sent to the trustworthy person or family members. The location of the device in terms of latitude & longitude is determined along with LED status. 31 | * Now, this data from GPS Module along with LED status is uploaded or updated in the cloud by ESP8266 Node MCU for further use. As soon as LED status in the cloud is set to 1 Beeping buzzer in Device 2 will start to Beep for indication purposes. That time display of the data in the cloud is accessed by the trusted person or family members so that they can take further action. 32 | 33 | ## Block Daigram 34 | * Device 1 - Using NEO 6M GPS Module 35 | ![Swasthya Final Implementation (GPS)](https://user-images.githubusercontent.com/83587918/192152053-5e4f3843-8bb1-44d8-abe9-a2952fd82ad8.png) 36 | * Device 2 - Using Beep Buzzer 37 | ![Device 2 Samraksh](https://user-images.githubusercontent.com/83587918/192152137-7ffc645a-226e-4b61-800c-b937dc6e55bb.png) 38 | 39 | ## Requirements 40 | 41 | #### Software Requirements 42 | * Arduino IDE 43 | * Thingspeak Cloud Service 44 | 45 | #### Hardware Requirements 46 | * NEO 6M GPS Module 47 | * ESP8266 Node MCU 48 | * Power Supply 49 | * Push Button 50 | * Beep Buzzer 51 | * General PCB 52 | * Resistor 53 | * LED 54 | 55 | #### Data Used 56 | * Longitude and Latitude 57 | * LED Status (0 & 1) 58 | * Date and Time 59 | 60 | ## Images 61 |

ESP8266 Node MCU

62 | 63 | ![NicePng_simba-png_5011059](https://user-images.githubusercontent.com/83587918/192152704-cc5d257a-1df7-4054-b8ff-9030268eae17.png) 64 | 65 |

NEO 6M GPS Module

66 | 67 | ![2cropped](https://user-images.githubusercontent.com/83587918/192152759-978363d2-7ab4-45fb-9162-d1942d3743ea.png) 68 | 69 |

Beep Buzzer

70 | 71 | ![2 (2)](https://user-images.githubusercontent.com/83587918/192153227-51d5709d-2509-4539-b05f-410333a294f2.png) 72 | 73 |

LED

74 | 75 | ![ledd full](https://user-images.githubusercontent.com/83587918/192153523-6cbf3cee-493c-4d28-9390-c82958df5cf7.png) 76 | 77 |

Power Supply

78 | 79 | ![4](https://user-images.githubusercontent.com/83587918/192153297-5bf81667-bd8a-485b-93ff-c1b557a5641c.png) 80 | 81 | ## Project Setup 82 | 83 | #### Step 1 84 | 85 | #### Step 2 86 | Install and setup Arduino IDE in your PC. Download and install all required libraries. Check and set the port in Arduino IDE and connect the NodeMCU ESP8266 using USB cable. Copy the code given above to a ESP8266 Node MCU of Device 1 and Device 2 respectively, in your Arduino IDE and make required changes in the code. 87 | Such As: 88 | * Wifi Name 89 | * Wifi Password 90 | * Channel ID 91 | * Thingspeak API Key 92 | 93 | #### Note 94 | Create an account in Thingspeak Cloud service then create one channel, give a name for that particular channel. When you open that channel you will get option called "API KEYS" here you will get the API key of your channel which you will need to copy in the code! Also make sure to create 3 fields in "Channel Setting" section. And set the channel access to the public. 95 | 96 | ## Output 97 | 98 | ![Screenshot (285)](https://user-images.githubusercontent.com/83587918/192154265-6818ed7b-6df4-4b6b-a193-fa6851711153.png) 99 | 100 | ![Screenshot (286)](https://user-images.githubusercontent.com/83587918/192154277-cf07ccda-2511-4b30-9506-9d59a3d9bfbb.png) 101 | 102 | ![Screenshot (287)](https://user-images.githubusercontent.com/83587918/192154281-4b4d59c7-4e50-499f-b3ab-88b158310c93.png) 103 | 104 | ![msg1794739563-10150](https://user-images.githubusercontent.com/83587918/192154383-61b5a74a-0083-496a-9367-79b2c1905712.jpg) 105 | 106 | ## Result and Discussion 107 | 108 | * Once the trusted person/family member gets the output in Thingspeak (Cloud) they have to copy the Latitude & Longitude Values then paste it to the Google Map followed by " , " 109 | * Example: Latitude=52.4512 & longitude=65.2165 then 52.4512,65.2165 is to be entered in Google Map. 110 | * That time in Google Map Trusted person/family member will get the exact location of that co-ordinates. 111 | * So that they can take further action. 112 | 113 | ![Screenshot (26)](https://user-images.githubusercontent.com/83587918/192154453-a961c9af-86c6-4d5b-8996-1b0d84431fc5.png) 114 | 115 | ![Screenshot (27)](https://user-images.githubusercontent.com/83587918/192154464-ecd129c9-d704-4e6a-85f6-d7a400b218f7.png) 116 | 117 | ## End Customers 118 | * Common Proplr 119 | * Police Department 120 | * Government 121 | 122 | ## Application 123 | * Girls when in suspicious environments or when in danger can share their location and hence ask for help from the known ones. 124 | * Aged people when away from home or are remote, can ask for help in case of any threats or health issues. 125 | * Children notify their guardians about the need for help when in trouble. 126 | * Getting notified about the location and the need for help facilitates quick action. 127 | 128 | ## Conclusion 129 | * Primary goal of this project is to ensure every woman in our society to feel safe and secured. According to the survey in India 53% of working women are not feeling safe. 130 | * Implementing real time application and a device, we can solve the problems to an extent. 131 | * With furthur research and innovation, this project is used as a small wearable device. 132 | 133 | 134 | 135 | https://user-images.githubusercontent.com/83587918/192154887-5925bb24-6981-42fc-86ea-69c0e90c0d1c.mp4 136 | 137 | 138 | 139 | 140 | --------------------------------------------------------------------------------