Here is the function that creates me this problem:
int rechercheUtilisateur(char numUtilisateur[TAILLE_NUM_UTI]){
int i, ligne = 1;
//declaration des tableaux locaux
char numString[TAILLE_NUM_UTI];
//place le pointeur au debut du fichier
myFile.seek(0);
//retrieve the ID number of the line
for(i=0; i<TAILLE_NUM_UTI-1; i++) numString*=myFile.read(); *
_ numString*='\0';*_
* while(strcmp(numUtilisateur, numString)){*
* if(!sautDeLigne()){ //move to the next line*
* myFile.seek(0);*
* return 0;*
* }*
* ligne++;*
* //retrieve the ID number of the line*
* for(i=0; i<TAILLE_NUM_UTI-1; i++){
_ numString=myFile.read();
}
numString='\0';
}
//place le pointeur au debut de la ligne*
* myFile.seek(myFile.position()-TAILLE_NUM_UTI);*
* return ligne;
}
[/font]
It looks in a text file by a user's ID number.
sample text file:
10000001 Marson Julien 7654 31678 11/05/2012 enseignant physique 03/04/2012 Fabre oui non
10000002 Zygmaniak Ghislain 55 21234 10/05/2012 etudiant physique 02/04/2012 Fabre oui non
63802020 Verron Maxime 234 22222 12/05/2012 etudiant mathématique 04/04/2012 Fabre non oui
63802021 Dumont Tony 34 22 12/04/2012 etudiant mathématique 04/04/2012 Fabre oui non
> jraskell:
> > gigiZ:
> > After the execution of a function that searches a number in the file my arduino reset.
>
>
>
> Just taking a shot in the dark here, since there's no code to look at, but I'd guess you're reading a large amount of data into SRAM, running out of SRAM, and overwriting the stack. This is a very common cause of Arduino resets.*
I think I do not use any memory:
Binary sketch size: 17932 bytes (of a 258048 byte maximum)
Thanks_