Phone number input from serial monitor
good day everyone,
i want input phone numbers (at least 10) using serial monitor and store them in array
on first line of code. how manipulate code below , make work?
char *phone_no[]={"9xxxxxxxxx","9xxxxxxxxx", "9xxxxxxxxx", "9xxxxxxxxx", "9xxxxxxxxx", "9xxxxxxxxx", "9xxxxxxxxx", "9xxxxxxxxx", "9xxxxxxxxx", "9xxxxxxxxx" };}
void setup() {
serial.begin(115200);
delay(300);
for (int = 0; i<=9; i++){
serial.println("at+cmgf=1");
delay(2000);
serial.print("at+cmgs=\"");
serial.print(phone_no);
serial.write(0x22);
serial.write(0x0d); // hex equivalent of carraige return
serial.write(0x0a); // hex equivalent of newline
delay(2000);
serial.print("welcome!");
delay(2000);
serial.println (char(26));//the ascii code of ctrl+z 26
serial.println("message sent!");
}
thank in advance.
i want input phone numbers (at least 10) using serial monitor and store them in array
on first line of code. how manipulate code below , make work?
char *phone_no[]={"9xxxxxxxxx","9xxxxxxxxx", "9xxxxxxxxx", "9xxxxxxxxx", "9xxxxxxxxx", "9xxxxxxxxx", "9xxxxxxxxx", "9xxxxxxxxx", "9xxxxxxxxx", "9xxxxxxxxx" };}
void setup() {
serial.begin(115200);
delay(300);
for (int = 0; i<=9; i++){
serial.println("at+cmgf=1");
delay(2000);
serial.print("at+cmgs=\"");
serial.print(phone_no);
serial.write(0x22);
serial.write(0x0d); // hex equivalent of carraige return
serial.write(0x0a); // hex equivalent of newline
delay(2000);
serial.print("welcome!");
delay(2000);
serial.println (char(26));//the ascii code of ctrl+z 26
serial.println("message sent!");
}
thank in advance.
Arduino Forum > Using Arduino > Programming Questions > Phone number input from serial monitor
arduino
Comments
Post a Comment