senior-student
Newbie level 4
- Joined
- Dec 7, 2012
- Messages
- 5
- Helped
- 0
- Reputation
- 0
- Reaction score
- 0
- Trophy points
- 1,281
- Activity points
- 1,319
Hi every one,
I am using a wireless sensoe, and it has its own compiler with c language.
what i want is to save the accelerometer value on a text file on the SD card of the wireless.
The sensor has an accelerometer library.
my problem is when i want to write to the text value the value of the function not the value of the function.
so i tried another manner and i got an error.
Here is my code:
and here is the error what i got:
hope you can help me.
thanks and regards
I am using a wireless sensoe, and it has its own compiler with c language.
what i want is to save the accelerometer value on a text file on the SD card of the wireless.
The sensor has an accelerometer library.
my problem is when i want to write to the text value the value of the function not the value of the function.
so i tried another manner and i got an error.
Here is my code:
Code C - [expand] 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 const char* filename="data.txt"; void setup(){ //setup for Serial port USB.begin(); SD.ON(); // setup the GPS module USB.println("Setting up GPS..."); ACC.ON(); // waiting for GPS is connected to satellites while( !ACC.check()) delay(1000); USB.println("Connected"); } void loop(){ byte check = ACC.check(); // Getting Time uint8_t x_acc = ACC.getX(); //----------Y Values----------------------- int y_acc = ACC.getY(); //----------Z Values----------------------- int z_acc = ACC.getZ(); USB.print("\n------------------------------\nCheck: 0x"); USB.println(check, HEX); USB.println("\n \t0X\t0Y\t0Z"); USB.print(" ACC\t"); USB.print(x_acc, DEC); USB.print("\t"); USB.print(y_acc, DEC); USB.print("\t"); USB.println(z_acc, DEC); SD.appendln("data.txt",":"); SD.appendln("data.txt",x_acc); SD.appendln("data.txt",":"); SD.appendln("data.txt",y_acc); SD.appendln("data.txt",":"); SD.appendln("data.txt",z_acc); USB.println("Write to 'data.txt' "); }
and here is the error what i got:
Code:
In function 'void loop()':
error: call of overloaded 'appendln(const char [9], uint8_t&)' is ambiguousC:\Users\Administrator.hkfong-PC\Desktop\waspmote-ide-v.02-windows\waspmote-ide-v.02-windows\hardware\cores\waspmote-api-v.029/WaspSD.h:593: note: candidates are: uint8_t WaspSD::appendln(const char*, const char*) <near match>
C:\Users\Administrator.hkfong-PC\Desktop\waspmote-ide-v.02-windows\waspmote-ide-v.02-windows\hardware\cores\waspmote-api-v.029/WaspSD.h:602: note: uint8_t WaspSD::appendln(const char*, uint8_t*) <near match>
thanks and regards
Last edited by a moderator: