-
-
Notifications
You must be signed in to change notification settings - Fork 17
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
writefile(string) #23
Comments
Hi, this lib can read and write char type of variables(c type string alias char array), so actually yes is possible converting to integer or vice versa just need to write these routines which make the conversions. If there is a need I can think about it and maybe write these functions. |
Hi, if you can, please download and test this version of the library, some new functions and example are available, e.g. writing and reading integer/float numbers. But testing is required. |
thanks! |
Ok, I integrated this into a generic test for a temperature controller data logger. The update works. Is it possible to /newline after a char string? File:
Output;
|
It's possible if you add |
I have added function |
adding the \n to the end solved the newline for me, such as:
The writeChar works as well, such as:
Data logger is doing what I need |
works for me |
UR welcome. Thanks for feedback. Then we can close this issue. |
Thank you! |
It is possible to register a number with three decimal places using flashdrive.writeNum(float); ? tks |
I am trying to use the USB as a csv data logger and I am not sure if I am off, but char writing seems a bit cumbersome, vs #variables particular with #number values such as int.
is it possible to directly write an integer?
The ch376msc guide states:
flashDrive.writefile(string, strlen(string)); //string, string length
//but string really this is really a char string
for data logging it is fairly straight forward to add int, floats, etc.
//standard sdFat.h then example is
file.print(float); file.println();
//CH376msc.h requires example
string.toCharArray(charstring,10)
//then
writefile(charstring, strlen(charstring));
`
this all gets quite cumbersome when dealing with multiple data variables including floating points.
The text was updated successfully, but these errors were encountered: