![](/media/cache/group/default_image.jpg.50x50_q85.jpg)
storing variables in single array for transmission
Dependencies: SDFileSystem dspmodified mbed
Fork of FTPGET_Merged by
Diff: merged_code.cpp
- Revision:
- 14:83b823fdcdd0
- Parent:
- 13:73d6de10d15c
- Child:
- 15:f2a7003fcea1
--- a/merged_code.cpp Thu Mar 19 09:13:56 2015 +0000 +++ b/merged_code.cpp Mon Apr 06 12:09:20 2015 +0000 @@ -9,7 +9,7 @@ #define freq 1 #define fft_points 16384 #define dur_sec 16.384 -#define module_name "NTFT" //enter module name here +#define module_name "TFT1" //enter module name here Serial pc(USBTX, USBRX); Serial gsm(D1, D0); @@ -377,7 +377,7 @@ for(int i=0; i<max_points_count; i++) { - fprintf(fp,"\r\n%d %d",index[i], int(maxima[i])); + fprintf(fp,"\n%d %d",index[i], int(maxima[i])); //pc.printf("\r\n %d %d",index[i], int(maxima[i])); } if(fft_type==0) @@ -797,12 +797,15 @@ { int x = 0; + char command3[40]; wait(10); ftp_connect(); sendATcommand("AT+FTPGETNAME=\"Final.txt\"", "OK", 5,0); - sendATcommand("AT+FTPGETPATH=\"/\"", "OK", 5,0); + //sendATcommand("AT+FTPGETPATH=\"/\"", "OK", 5,0); + sprintf(command3,"%s/%s/\"", "AT+FTPGETPATH=\"", module_name); + sendATcommand(command3,"OK",5,0); if (sendATcommand("AT+FTPGET=1\r", "+FTPGET:1,1", 20,0) == 1) {