hi i wanna do a gps tracker so im doing first the config to send command and validate these command exampple i write in the serial monitor the command adminpassword myphone number (admin123456 12345678) so i need write in the eeprom the pass in these case 123456 and my cell number 12345678 and the key work admin that tell me i wanna config a admin number so far i compare char and work but need the other stuff plaease help me with what way i can go thanks for you time.
#include <EEPROM.h>
char inData[40]; // Allocate some space for the string
char inChar=-1; // Where to store the character read
byte index = 0; // Index into array; where to store the character
char clave[5] = {'c','l','a','v','u'};//the key word to change the password
char pass[6] = {'c','l','a','v','e'};
char hi[6] = {'h','e','l','l','o'};
char Comp(char* This) {
while (Serial.available() > 0) // Don't read unless
// there you know there is data
{
if(index < 19) // One less than the size of the array
{
inChar = Serial.read(); // Read a character
inData[index] = inChar; // Store it
index++; // Increment where to write next
inData[index] = '\0'; // Null terminate the string
}
}
if (strcmp(inData,This) == 0) {
for (int i=0;i<19;i++) {
inData*=0;*
Take a deep breath, calm down and take a few moments to think about your project. Then take a few more moments to think about how you might effectively communicate your questions to forum members.
If English is not your native language, note that sentences are separated by the "." character and begin with upper case letters, like "A".
hi thanks for the reply my idea is do a gps tracker but first I have the idea for know the position I have to send sms with a word that tell me the action I wanna config and the password for example if i wanna config the cellnumber 12345678 as admin send the sms in these case I wanna test by serial monitor so if I send adminpasswordspacecellphonenumber (admin123456 12345678) save in the eeprom memory the admin number as 12345678 nad other funtion like change the password for example send the command pass123456 654321 change the password 123456 for 654321 and save it in the eeprom in case the board is restart dont forget the last password the i put it in the first step I wanna work validate these command for serial monitor a change the value like password and the cellphone number authorized to config the board trough these commands. please tell me if im doing something wrong and I change it english is not my first languaje thanks for your time to all
EYSAKU:
sorry if I dont write you well or dont explaind my idea well.can you tell me what i did wrong?
You did not read Reply #1 carefully.
Break your long endless text into sentences and paragraphs. I run out of breath just trying to read your stuff.
I presume your keyboard has a RETURN key, the ability to do capitals and punctuation marks, and the ability to put more that a single space between words when that is appropriate.
ok
I wanna do a gps tracker, but i think I have to do it by steps, the functions I wanna add to the tracker are.
1.the tracker must have a password for security. So only the person with these password can change the settings, and these password I can change it by sms command replacing new old password for new password. And these password must remain in the eeprom memory
2. the tracker must have a least one admin user, which received the alarm and can send command to the tracker.
3. the other funtion is that I create command to different function like know it the position or turn off the car.
Well these is the part where I have more difficulty. Save in the eeprom memory string or several char, and by the received command have the ability to change it the other part is send AT command which I have more experience. my experince programming arduino is a little more high that basic so any comment will be very useful