Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependencies: SDFileSystem dspmodified mbed
Revision 11:63f48533dc6f, committed 2015-03-11
- Comitter:
- jaspreetsingh
- Date:
- Wed Mar 11 06:40:21 2015 +0000
- Parent:
- 10:9184e2fb5974
- Commit message:
- FTPPUTPATHNAME updated with /mod_name/YYMM/DD/HH format
Changed in this revision
| merged_code.cpp | Show annotated file Show diff for this revision Revisions of this file |
--- a/merged_code.cpp Mon Mar 09 13:17:46 2015 +0000
+++ b/merged_code.cpp Wed Mar 11 06:40:21 2015 +0000
@@ -9,7 +9,7 @@
#define freq 1
#define fft_points 16384
#define dur_sec 16.384
-#define module_name "TST2" //enter module name here
+#define module_name "NTFT" //enter module name here
Serial pc(USBTX, USBRX);
Serial gsm(D1, D0);
@@ -53,6 +53,7 @@
char timestampname[30]="";
char timestamppath[30]="";
int maxfreq = 0; // For Timestamp Function
+unsigned char CtrlZ = 0x1A; // For SMS Function
int m=0,mfinal;
int date, month, year, hour, minute, second,minuteold, secondold, temp = 0;
@@ -174,7 +175,7 @@
sprintf(hour_dir,"%s/%s%02d%02d%02d%02d",date_dir,sitename,year,month,date,hour);
sprintf(filepath,"%s/%s%02d%02d%02d%02d%02d%02d",hour_dir,sitename,year,month,date,hour,minute,second);
sprintf(filename,"%s%02d%02d%02d%02d%02d%02d",sitename,year,month,date,hour,minute,second);
- sprintf(ftpputpathname,"%s/%02d%02d/%02d%02d%02d",module_name,year,month,year,month,date); // For FTPPUTPATHNAME feature
+ sprintf(ftpputpathname,"%s/%02d%02d/%02d/%02d",module_name,year,month,date,hour); // For FTPPUTPATHNAME feature
//pc.printf("Ftpputpathname is %s\r\n",ftpputpathname); // For FTPPUTPATHNAME feature
gsmerr=0;
mkdir(main_dir,0777);
@@ -639,11 +640,11 @@
wait(3);
if(sendATcommand("AT+FTPTYPE=\"I\"", "OK", 5,0))
{
- if(sendATcommand("AT+FTPSERV=\"ftp.ipage.com\"", "OK", 10,0))
+ if(sendATcommand("AT+FTPSERV=\"ftp.panchsheel.biz\"", "OK", 10,0))
{
- if(sendATcommand("AT+FTPUN=\"hdwwrite\"", "OK\r", 10,0))
+ if(sendATcommand("AT+FTPUN=\"hardware@panchsheel.biz\"", "OK\r", 10,0))
{
- if(sendATcommand("AT+FTPPW=\"Ghdu@3i\"", "OK\r", 10,0)) return 1;
+ if(sendATcommand("AT+FTPPW=\"DAStest123\"", "OK\r", 10,0)) return 1;
}
}
}
@@ -908,6 +909,20 @@
//}
}
+//--------------------------------------------------------------------------------------------------//
+// SMS FUNCTION //
+//--------------------------------------------------------------------------------------------------//
+
+void sms() {
+ pc.printf("\r\n Hi I am sending sms");
+ sendATcommand("AT+CMGF=1\r", "OK", 10,0);
+ sendATcommand("AT+CMGS=\"09896389883\"\r", "OK", 5,0);
+ gsm.printf("Hi Hows You"); // Enter the sms here in this place
+ gsm.printf("%c", CtrlZ);
+
+}
+
+
//----------------------------------------------------- MAIN LOOP -----------------------------------------------------------
int main()