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.

have @ examples in serial input basics - simple reliable ways receive data.

...r


Arduino Forum > Using Arduino > Programming Questions > Phone number input from serial monitor


arduino

Comments

Popular posts from this blog

Error compiling for board Arduino/Genuino Uno.

Installation database is corrupt

esp8266 (nodemcu 0.9) client.write très lent ???