-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathMetrochange_SMS.ino
More file actions
30 lines (23 loc) · 831 Bytes
/
Copy pathMetrochange_SMS.ino
File metadata and controls
30 lines (23 loc) · 831 Bytes
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
/*
Send SMS messages from the MetroChange kiosk, receive configuration variables.
*/
boolean sendSMS(String theMessage){
/*
cell.println("AT+CMGF=1"); // set SMS mode to text
cell.print("AT+CMGS="); // now send message...
cell.print(34,BYTE); // ASCII equivalent of "
cell.print(mobilenumber);
cell.println(34,BYTE); // ASCII equivalent of "
delay(500); // give the module some thinking time
cell.print(TwilioPin+" "+theMessage); // our message to send
cell.println(26,BYTE); // ASCII equivalent of Ctrl-Z
//this is going to be problematic - we can't hang the Arduino while we're waiting for the OK
delay(15000); // the SMS module needs time to return to OK status
do // You don't want to send out multiple SMSs.... or do you?
{
delay(1);
}
while (1>0);
return true;
*/
}