Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

Question using EEPROM

Status
Not open for further replies.

brian25

Member level 2
Member level 2
Joined
Feb 18, 2013
Messages
52
Helped
2
Reputation
4
Reaction score
2
Trophy points
1,288
Visit site
Activity points
1,601
How to save the password in eeprom? when the device is turn off the pass was still in the chip.
and what syntax to use for changing the password?


tnx


Code:
char p1[] = {"11111"};

void Password(){

  char p2[5];
  int y = sizeof(p1);
  int flag=0;

  for (int x=0;x<=y;x++)
  {
    p2[x]= p1[x];
  }


  if(gsm.readSMS(smsbuffer, 5, p2, 5) == 0)
  flag=1;
  {
    if(strstr(smsbuffer,"11111") != NULL){
    Serial.println(strcmp(smsbuffer,"Matched"));
    }
    else if(strstr(smsbuffer," ") != NULL){
    flag=2;


  }
    }
  if(flag==2){    
    Serial.println(strcmp(smsbuffer,"Matched"));
    delF();
    }
    else if(flag==1){    
    Serial.println(strcmp(smsbuffer,"Don't Matched"));
    delF();

}
}

void delF()
{
 Serial.println("Executing delete");
     for (int j=0;j<=4;++j){     
     Serial.println(sms.DeleteSMS(j));
     }
}
 
Last edited:

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top