Skip to main content

gsm gps finger print arduino code


#include <string.h>
#include <ctype.h>
#include <LiquidCrystal.h>
LiquidCrystal lcd(13, 12, 11, 10, 9, 8);

#include <SoftwareSerial.h>

SoftwareSerial mySerial(7, 6); // RX, TX


char fy=0;

// constants won't change. They're used here to
// set pin numbers:
const int buttonPin = 7;     // the number of the pushbutton pin
int buttonState1 = 0;         // variable for reading the pushbutton status
int buttonState2 = 0;         // variable for reading the pushbutton status
int buttonState3 = 0;         // variable for reading the pushbutton status

 int ledPin = 8;                  // LED test pin
 int rxPin = 0;                    // RX PIN
 int txPin = 1;                    // TX TX
 int byteGPS=-1;
 char linea[300] = "";
 char lat[30] = "";
 char lon[30] = "";

 char comandoGPR[7] = "$GPRMC";
 int cont=0;
 int bien=0;
 int conta=0;
 int indices[13];
int sensorValue1 = 0;  // variable to store the value coming from the sensor
int sensorValue2 = 0;  // variable to store the value coming from the sensor
int sensorValue3 = 0;  // variable to store the value coming from the sensor
int sensorValue4 = 0;  // variable to store the value coming from the sensor
int sensorValue5 = 0;  // variable to store the value coming from the sensor
int sensorValue6 = 0;  // variable to store the value coming from the sensor
int sensorValue7 = 0;  // variable to store the value coming from the sensor

int cnt = 0,fl=0,i;  // variable to store the value coming from the sensor
long duration, inches, cm,distance;

int hb,hbt,hbtt,boc,finc;
char kval;
int bhb,bhbt,bhbtt;

void txs(unsigned char val)
{
int i;
Serial.write(val);
for(i=0;i<1200;i++);
}

char f1,f2,f3,oc;

 void setup() {
 
   Serial.begin(9600);
   mySerial.begin(9600);
  pinMode (2,OUTPUT);//attach pin 2 to vcc
  pinMode (3,OUTPUT);//attach pin 2 to vcc
  pinMode (4,INPUT_PULLUP);//attach pin 5 to GND

  digitalWrite(2,0);
  digitalWrite(3,1);
 
    lcd.begin(16, 2);
     lcd.setCursor(0, 0);
     lcd.print("BIKE                    ");
     lcd.setCursor(0, 1);
     lcd.print("SECURITY                     ");


 Serial.print("AT");
         Serial.write(13);
         Serial.write(10);
                  delay(1000);
            Serial.print("AT+CMGF=1");
         Serial.write(13);
         Serial.write(10);
                  delay(1000);
     
  lcd.setCursor(0, 0);
     lcd.print("Show            ");
     lcd.setCursor(0, 1);
     lcd.print("Finger                     ");

 
 }
long ll;

 void loop() {

  if (mySerial.available()) {
    lcd.setCursor(15, 1);
    kval=mySerial.read();
    lcd.print(kval);

  if(kval=='0')
    {
      finc=2;
        lcd.setCursor(0, 0);
     lcd.print("Unauthorised            ");
     lcd.setCursor(0, 1);
     lcd.print("                        ");
       digitalWrite(3,0);
    }
  else
  {
      digitalWrite(2,1);    
        lcd.setCursor(0, 0);
     lcd.print("Authorised            ");
     lcd.setCursor(0, 1);
     lcd.print("                        ");
     digitalWrite(3,1);
  }
  }


 

if(finc==2)
    {
     digitalWrite(2,0);    
      if(f1==0)
        {
          digitalWrite(3,0);
          f1=1;
        Serial.print("AT");      
         Serial.write(13);
         Serial.write(10);     delay(1000);    
         Serial.print("AT+CMGS=");
         Serial.write(34);
         Serial.print("7748720606");
         Serial.write(34);
         Serial.write(13);
         Serial.write(10);
         delay(1000);
         Serial.print("UnAuthorised");
         Serial.write(13);
         Serial.write(10);
txs(' ');txs(' ');
  txs(lat[0]);
  txs(lat[1]);
  txs(lat[2]);
  txs(lat[3]);
  txs(lat[4]);
  txs(lat[5]);
  txs(lat[6]);
  txs(lat[7]);
   txs(' ');
  txs(' ');txs(' ');
  txs(lon[0]);
  txs(lon[1]);
  txs(lon[2]);
  txs(lon[3]);
  txs(lon[4]);
  txs(lon[5]);
  txs(lon[6]);
  txs(lon[7]);
       
         Serial.write(26);        
        delay(5000);
        digitalWrite(3,1);    
        }
    }

 

while(i<150)
  {
    if (Serial.available() > 0)
    {
        linea[i]=Serial.read();         // Read a byte of the serial port
 i++;
    }
  }
       for (int i=0;i<100;i++){    //
        //Serial.print(linea[i]);
        if(linea[i]=='G')
          if(linea[i+1]=='P')
            if(linea[i+2]=='R')
              if(linea[i+3]=='M')
                 if(linea[i+4]=='C')
                    {
                      lat[0]=linea[i+19];
                      lat[1]=linea[i+20];
                      lat[2]=linea[i+21];
                      lat[3]=linea[i+22];
                      lat[4]=linea[i+23];
                      lat[5]=linea[i+24];
                      lat[6]=linea[i+25];
                      lat[7]=linea[i+26];

                      lon[0]=linea[i+31];
                      lon[1]=linea[i+32];
                      lon[2]=linea[i+33];
                      lon[3]=linea[i+34];
                      lon[4]=linea[i+35];
                      lon[5]=linea[i+36];
                      lon[6]=linea[i+37];
                      lon[7]=linea[i+38];
                                                   
                    }
            }
 
 
i=0;
 
 
 
 
 
 }

Comments

Popular posts from this blog

IDENTITY-BASED PROXY-ORIENTED DATA UPLOADING AND REMOTE DATA INTEGRITY CHECKING IN PUBLIC CLOUD report

IDENTITY-BASED PROXY-ORIENTED DATA UPLOADING AND REMOTE DATA INTEGRITY CHECKING IN PUBLIC CLOUD ABSTRACT More and more clients would like to store their data to PCS (public cloud servers) along with the rapid development of cloud computing. New security problems have to be solved in order to help more clients process their data in public cloud. When the client is restricted to access PCS, he will delegate its proxy to process his data and upload them. On the other hand, remote data integrity checking is also an important security problem in public cloud storage. It makes the clients check whether their outsourced data is kept intact without downloading the whole data. From the security problems, we propose a novel proxy-oriented data uploading and remote data integrity checking model in identity-based public key cryptography: IDPUIC (identity-based proxy-oriented data uploading and remote data integrity checking in public cloud). We give the formal definition, system model and se

A LOCALITY SENSITIVE LOW-RANK MODEL FOR IMAGE TAG COMPLETION

A LOCALITY SENSITIVE LOW-RANK MODEL FOR IMAGE TAG COMPLETION ABSTRACT Many visual applications have benefited from the outburst of web images, yet the imprecise and incomplete tags arbitrarily provided by users, as the thorn of the rose, may hamper the performance of retrieval or indexing systems relying on such data. In this paper, we propose a novel locality sensitive low-rank model for image tag completion, which approximates the global nonlinear model with a collection of local linear models. To effectively infuse the idea of locality sensitivity, a simple and effective pre-processing module is designed to learn suitable representation for data partition, and a global consensus regularizer is introduced to mitigate the risk of overfitting. Meanwhile, low-rank matrix factorization is employed as local models, where the local geometry structures are preserved for the low-dimensional representation of both tags and samples. Extensive empirical evaluations conducted on three

LIFI

LIFI Prof . Harald Haas is a technology of high brightness light emitting diodes(LED).It is bidirectional ,high speed and fully networked wireless communication.    LiFi is designed to use LED light bulbs similar to those currently in use in many energy-conscious homes and offices. However, LiFi bulbs are outfitted with a   chip   that modulates the light imperceptibly for optical data transmission. LiFi data is transmitted by the LED bulbs and received by photoreceptors. LiFi's early developmental models were capable of 150 megabits-per-second ( Mbps ). Some commercial kits enabling that speed have been released. In the lab, with stronger LEDs and different technology, researchers have enabled 10   gigabits -per-second (Gbps), which is faster than   802.11ad .  Benefits of LiFi: ·         Higher speeds than  Wi-Fi . ·         10000 times the frequency  spectrum  of radio. ·         More secure because data cannot be intercepted without a clear line of si