loading

Hello Everyone,


I'm Geeve George a 15 year old Maker/Electronics Hobbyist.I love Computer Vision , Android Development and Algorithm Design.I am currently in 11th Grade Computer Science Student at Little Rock Indian School. :) Find more about me at : www.geevegeorge.co.vu.

What is GPS ?


The Global Positioning System (GPS) is a satellite-based navigation system made up of a network of 24 satellites placed into orbit by the U.S. Department of Defense. GPS was originally intended for military applications, but in the 1980s, the government made the system available for civilian use.


What are the problems faced by women around the world ?


Violence against women (VAW) is, collectively, violent acts that are primarily or exclusively committed against women. Sometimes considered a hate crime, this type of violence targets a specific group with the victim's gender as a primary motive. This type of violence is gender-based, meaning that the acts of violence are committed against women expressly because they are women. The UN Declaration on the Elimination of Violence Against Women states that:

"violence against women is a manifestation of historically unequal power relations between men and women" and that "violence against women is one of the crucial social mechanisms by which women are forced into a subordinate position compared with men."

What is WEAR ?


Introduction :

Since the couple of years when I used to read newspapers I often read about the increasing rate of Violence against women in the National Daily's. I was frustrated by this and believed that "I can change this situation" or atleast I could create a device and open source it so that any developer on earth can make the current device better and bring out a change in this problem.

It was a couple of months ago when I this project idea first struck to my mind.I was focusing on building a device that was :

  • Low Cost ( Economically Feasible )
  • Wearable ( Handy )
  • Fast and Efficient

Thanking all the above factors into consideration I started building WEAR.

About the Device :

WEAR is made on top of the MediaTek LinkIT One Board.It is connected to a GPS module and also a Wifi Module.It is then hooked up to a 16*2 RGB LCD , I have also included a Button and a piezo buzzer.

What makes WEAR Stand 'OUT' ?


WEAR has two modes :

  1. The Hardware Device Mode :
  • In the Hardware Device Mode the user can click on the button on WEAR , on doing so the caregivers get a SMS Alert with a link to track the user in Real-Time.

2. The Smartphone Mode :

  • In the Smartphone Mode the user can open the WEAR Android App and Click on the Alert Button. On doing so a Notification is sent to the Wear Hardware Device at the user's home so that the caregivers can get a buzzer notification with a Link to monitor the User in Real Time on their Computer.

Hope you enjoyed reading the Introduction , Now let's start building WEAR!


Step 1: Hardware Setup!

Materials Required :


1. MediaTek LinkIT One Board [Buy Here]

2. Grove RGB LCD Backlight [Buy Here]

3. Grove 4 Pin AWG Wires [Buy Here]

4. Breadboard [Buy Here]

5. 10k resistors [Buy Here]

6. Micro USB Cable [Buy Here]

7. Grove Buzzer [Buy Here]

8. Grove Base Shield [Buy Here]

9.. Push Button [Buy Here]

10. An Android Smartphone.

Setting Up Hardware Parts :


  • Firstly you need to fix the Grove Base Shield on the Mediatek LinkIt One Board.
  • Then , connect the 16*2 LCD module to the 12C pin in the Grove Shield.
  • Now , take out the WiFi and GPS Module from your Mediatek LinkIt One box and fix them to the allotted areas present behind the LinkIt One Board.
  • Next , You need to take the Grove Buzzer module and connect it to any Digital Pins on the Grove Shield.
  • Now , You need to build the button circuit :
  • For this you need to fix the push button as shown in the schematics above and connect the different leads of the push button to 5V , Ground and a Digital Pin respectively.
  • Now you can take the entire setup and put it into a box that is designed so that it fits the LCD Display and button in proper locations.
  • You can refer the 3D Design below , make sure that you design a lid as well a place for the push button to fit into.
  • Yay! You are done with the hardware setup , A detailed and fun software setup can be seen in the next section! :)

WEAR Case 3D Design :



<strong><u><iframe frameborder="0" height="453" marginheight="0" marginwidth="0" scrolling="no" src="https://tinkercad.com/embed/caJn9KDpzGZ" width="725"></iframe><br></u></strong>
<strong><u><br></u></strong>
<strong><u><br></u></strong>

Step 2: Three Step Hardware Setup!

Step 3: Software Setup!

Firstly You need setup your MediaTek LinkIt One Board with the Arduino IDE , So I request you to follow the Instructions available in the Official Website of MediaTek Labs : http://bit.ly/1KcU66X


Once you have completed the Setup , you can launch the IDE and make sure you are connected to the Proper COM Port.

Arduino Source Code :

[Github Repository]

<p>/*<br> * Women Safety Wearable 
 * Author : Geeve George
 * Instrubtables : https://www.instructables.com/member/Geeve+George/
 */</p><p>#include <Ltask.h><ltask.h>
#include <LWiFi.h><lwifi.h>
#include <LWiFiServer.h><lwifiserver.h>
#include <LWiFiClient.h><lwificlient.h></lwificlient.h></lwifiserver.h></lwifi.h></ltask.h></p><p>#define WIFI_AP "Your Wifi SSID"
#define WIFI_PASSWORD "Your Wifi Password"
#define WIFI_AUTH LWIFI_WPA  </p><p>int serverPort = 80;
LWiFiServer server(serverPort);
int LED = 13;</p><p>#include <Wire.h><wire.h></wire.h></p><p>#include <rgb_lcd.h><rgb_lcd.h></rgb_lcd.h></p><p>#include <LGPS.h><lgps.h></lgps.h></p><p>gpsSentenceInfoStruct info;
char buff[256];</p><p>rgb_lcd lcd;</p><p>int ButtonPin = 7;
int BuzzerPin = 2;</p><p>double latitude;
double longitude;</p><p>int buttonState;</p><p>static unsigned char getComma(unsigned char num,const char *str)
{
  unsigned char i,j = 0;
  int len=strlen(str);
  for(i = 0;i < len;i ++)
  {
     if(str[i] == ',')
      j++;
     if(j == num)
      return i + 1; 
  }
  return 0; 
}</p><p>static double getDoubleNumber(const char *s)
{
  char buf[10];
  unsigned char i;
  double rev;
  
  i=getComma(1, s);
  i = i - 1;
  strncpy(buf, s, i);
  buf[i] = 0;
  rev=atof(buf);
  return rev; 
}</p><p>static double getIntNumber(const char *s)
{
  char buf[10];
  unsigned char i;
  double rev;
  
  i=getComma(1, s);
  i = i - 1;
  strncpy(buf, s, i);
  buf[i] = 0;
  rev=atoi(buf);
  return rev; 
}</p><p>void parseGPGGA(const char* GPGGAstr)
{
  
  double latitude;
  double longitude;
  int tmp, hour, minute, second, num ;
  if(GPGGAstr[0] == ')
  {
    tmp = getComma(1, GPGGAstr);
    hour     = (GPGGAstr[tmp + 0] - '0') * 10 + (GPGGAstr[tmp + 1] - '0');
    minute   = (GPGGAstr[tmp + 2] - '0') * 10 + (GPGGAstr[tmp + 3] - '0');
    second    = (GPGGAstr[tmp + 4] - '0') * 10 + (GPGGAstr[tmp + 5] - '0');
    
    sprintf(buff, "UTC timer %2d-%2d-%2d", hour, minute, second);
    Serial.println(buff);
    
    tmp = getComma(2, GPGGAstr);
    latitude = getDoubleNumber(&GPGGAstr[tmp]);
    tmp = getComma(4, GPGGAstr);
    longitude = getDoubleNumber(&GPGGAstr[tmp]);
    sprintf(buff, "latitude = %10.4f, longitude = %10.4f", latitude, longitude);
    Serial.println(buff); 
    
    tmp = getComma(7, GPGGAstr);
    num = getIntNumber(&GPGGAstr[tmp]);    
    sprintf(buff, "satellites number = %d", num);
    Serial.println(buff); 
  }
  else
  {
    Serial.println("Not get data"); 
  }
}</p><p>void setup()
{</p><p>  Serial.begin(9600);
  lcd.begin(16,2);</p><p>  LGPS.powerOn();
  Serial.println("LGPS Power on, and waiting ..."); 
  delay(3000);
  
 
  pinMode(ButtonPin,INPUT);
  pinMode(BuzzerPin,OUTPUT);
  
  pinMode(LED, OUTPUT);
  LWiFi.begin();</p><p>  // keep retrying until connected to AP
  Serial.println("Connecting to AP");
  while (0 == LWiFi.connect(WIFI_AP, LWiFiLoginInfo(WIFI_AUTH, WIFI_PASSWORD)))
  {
    digitalWrite(LED, HIGH);
    delay(100);
    digitalWrite(LED, LOW);
    delay(100);
    digitalWrite(LED, HIGH);
    delay(100);
    digitalWrite(LED, LOW);
    delay(600);</p><p>  }
  digitalWrite(LED, HIGH);
  printWifiStatus();
  Serial.println("Start Server");
  server.begin();
  Serial.println("Server Started");
  digitalWrite(LED, LOW);
}</p><p>int loopCount = 0;</p><p>void loop()
{</p><p>  
  // put your main code here, to run repeatedly:
  String str = "";
  String url = "";
  int i;
  delay(500);
  loopCount++;
  LWiFiClient client = server.available();
  if (client)
  {
    Serial.println("new client");
    // an http request ends with a blank line
    boolean currentLineIsBlank = true;
    while (client.connected())
    {
      if (client.available())
      {
        // we basically ignores client request, but wait for HTTP request end
        char c = client.read();
        Serial.print(c);
        if(c != '\n')
          str += c;
        if(c == '\n')
        {
          //Serial.println(str);
          if(str.startsWith("GET "))
          {
            url = str.substring(4, str.lastIndexOf(" "));
            Serial.print("URL:");
            Serial.print(url);
            Serial.println(":");
          }
          str = "";
        }</p><p>        if (c == '\n' && currentLineIsBlank)
        {
          Serial.println("send response");
          // send a standard http response header
          client.println("HTTP/1.1 200 OK");
          client.println("Content-Type: text/html");
          client.println("Connection: close");  // the connection will be closed after completion of the response
          client.println();
          if(url != String("favicon.ico"))
          {
            client.println("");
            client.println("
\n
\n
</p><p>\n</p><p>");
            IPAddress ip = LWiFi.localIP();
            client.println("
</p><center>");
            client.println("
<form action="");
            client.println("" method="GET">Tell your device what to do!<br><br><input type="radio" name="q" value="on">Turn the LED on.<br><input type="radio" name="q" value="off">Turn the LED off.<br><br><input type="submit" value="Do it!"></form><p>");
            //i = digitalRead(LED);
            url.toLowerCase();
            
            
            if(url == String("/?q=on"))
            {</p><p>              lcd.clear();
              lcd.println("Lat:");
              lcd.println(latitude);
              
              lcd.setCursor(0,1);
              lcd.println("Lon:");
              lcd.println(longitude);
     
              Serial.println("http://www.latlong.net/c/?lat=");
              Serial.println(latitude);
              Serial.println("&long=");
              Serial.println(longitude);
      
          
 
              digitalWrite(BuzzerPin,HIGH);
              delay(2000);
              digitalWrite(BuzzerPin,LOW);
              lcd.clear();</p><p>    
              digitalWrite(LED, HIGH);
              client.println("LED on<br>");
            }
            else if(url == String("/?q=off"))
            {
              digitalWrite(LED, LOW);
              client.println("LED off<br>");</p><p>              digitalWrite(BuzzerPin,LOW);
              lcd.clear();
            }
            else
            {
              client.println("Doing nothing<br>");</p><p>              digitalWrite(BuzzerPin,LOW);
              lcd.clear();
            }
            
            
            client.println("</p></center><p>\n</p><p>");
            client.println();
            break;
          }
        }
        if (c == '\n')
        {
          // you're starting a new line
          currentLineIsBlank = true;
        }
        else if (c != '\r')
        {
          // you've gotten a character on the current line
          currentLineIsBlank = false;
        }
      }
    }
    // give the web browser time to receive the data
    delay(50);</p><p>    // close the connection:
    Serial.println("close connection");
    client.stop();
    Serial.println("client disconnected");
  }</p><p>  buttonState = digitalRead(ButtonPin);</p><p>  if(buttonState == HIGH){
  
              lcd.clear();
              lcd.println("Lat:");
              lcd.println(latitude);
              
              lcd.setCursor(0,1);
              
              lcd.println("Lon:");
              lcd.println(longitude);
     
              Serial.println("LINK : http://www.latlong.net/c/?lat=");
              Serial.println(latitude);
              Serial.println("&long=");
              Serial.println(longitude);
    
          
 
    digitalWrite(BuzzerPin,HIGH);
    delay(2000);
    digitalWrite(BuzzerPin,LOW);
    lcd.clear();</p><p>     
    
  }</p><p>  else 
  {
    digitalWrite(BuzzerPin,LOW);
    lcd.clear();
    
  }</p><p>  
}</p><p>void printWifiStatus()
{
  // print the SSID of the network you're attached to:
  Serial.print("SSID: ");
  Serial.println(LWiFi.SSID());</p><p>  // print your WiFi shield's IP address:
  IPAddress ip = LWiFi.localIP();
  Serial.print("IP Address: ");
  Serial.println(ip);</p><p>  Serial.print("subnet mask: ");
  Serial.println(LWiFi.subnetMask());</p><p>  Serial.print("gateway IP: ");
  Serial.println(LWiFi.gatewayIP());</p><p>  // print the received signal strength:
  long rssi = LWiFi.RSSI();
  Serial.print("signal strength (RSSI):");
  Serial.print(rssi);
  Serial.println(" dBm");
}</p>
<br>

Step 4: Android App Development!



What is MIT App Inventor ?


MIT App Inventor is an innovative beginner's introduction to programming and app creation that transforms the complex language of text-based coding into visual, drag-and-drop building blocks. The simple graphical interface grants even an inexperienced novice the ability to create a basic, fully functional app within an hour or less.

As I had to rapidly develop and android app that does something simple , I found out about MIT App Inventor that let's you build apps in an easy way.

  • Firstly Log On To : http://ai2.appinventor.mit.edu/
  • Next , Build the initial Screen of the App
  • Then Connect and build the blocks as shown in the Image Above.

Or , You can download the WEAR app that has been attached here.



Now , let's move on to the Final Results!


Step 5: Results!

I am Glad that you have made it up till this step! By Open-Sourcing this project I wish to contribute to the further development of Women Safety Technology so that any developer around the world can modify and transform this project and make a better version.

Thank you for checking out this instructable! :)

About This Instructable

1,131views

12favorites

License:

Bio: Maker. Moonshot thinker. Researcher. Programmer. Quizzer. Teenager!
More by Geeve George:LeapTek : Leap Motion Interface with MediaTek LinkIt ONE Board! SCOUT : Smart People Counter! ( A low cost counter for Crowd Density Mapping at Large Gatherings and Shopping Malls ) WEAR : A Women Safety Wearable Device 
Add instructable to: