Project 2k18.txt

  • Uploaded by: Shan Far
  • 0
  • 0
  • April 2020
  • PDF

This document was uploaded by user and they confirmed that they have the permission to share it. If you are author or own the copyright of this book, please report to us by using this DMCA report form. Report DMCA


Overview

Download & View Project 2k18.txt as PDF for free.

More details

  • Words: 103
  • Pages: 2
#define vibrate_sense 7 char char char char

str[70]; *test="$GPGGA"; logitude[10]; latitude[10];

int i,j,k; int temp; //int Ctrl+z=26; int led=13; void setup() { Serial.begin(9600); pinMode(vibrate_sense, INPUT); pinMode(led, OUTPUT); delay(3000); } void loop() { if (digitalRead(vibrate_sense)==0) { for(i=18;i<27;i++) { latitude[j]=str[i]; j++; } for(i=30;i<40;i++) { logitude[k]=str[i]; k++; } Serial.begin(9600); Serial.println("AT+CMGF=1"); delay(10); Serial.println("AT+CMGS=\"+918973435786\""); Serial.println("Vehicle Accident Happend at Place:"); Serial.print("Latitude(N):10.93912 "); Serial.println(latitude); Serial.print("Longitude(E):76.96154 "); Serial.println(logitude); Serial.print("Help Please"); Serial.write(26); temp=0; i=0; j=0; k=0; delay(20000); Serial.begin(9600); }

} void serialEvent() { while (Serial.available()) { char inChar = (char)Serial.read(); str[i]= inChar; i++; if (i < 9) { if(str[i-1] != test[i-1]) { i=0; } } if(i >=60) { break; } } }

Related Documents

Project
May 2020 27
Project
June 2020 23
Project
November 2019 40
Project
November 2019 45
Project
December 2019 44
Project
November 2019 44

More Documents from ""