Hello everybody giving a helping hand,
got me some trouble here. I was making a program that reads out the duty cycle of an ADXL202 sensor. Everything works, except the part were i want to print my data in a file using this :
FILE *stream, *fopen(); if ( (stream = fopen(...)) != NULL) fscanf(stream,''%s'', string);
Ok this is were my problems start. The compiler gives me the error that he doesn't know this type FILE ore the function fopen (). This seems to be logical to me since i looked in my stdio.h header and found nothing really according to that declaration. Is there a posibility that this is stored in another source file or does not exist??? Or .... how do i get my data's in a *.txt file ???
Thanks for the help i'm about to receive :))
P.S: Im using a 80C535 µC, sorry for not mantuening
My *.txt file is named test_acc.txt and is located on my desktop that means in c:/Dokumente und Einstellungen/Desktop. My controler is via serial port connected to the pc.
Now would be a good time to stop thinking like a PC programmer and start thinking like an embedded programmer.
Files require an operating system that handles files, or at least a file system driver. Either of those would be an oddity in the uC world
Or .... how do i get my data's in a *.txt file ???
Well, if you tell us where the *.txt file is (on your PCs hard drive ?) and how the uC is connected to it (serial port), maybe we can give you some hints.
View all questions in Keil forum