Этот скетчь работает в режиме терминала через ардуиновский сериал монитор
PHP код:
#include <NewSoftSerial.h>

char incoming_char=0;      //Will hold the incoming character from the Serial Port.

 
NewSoftSerial phone(23);

 
void setup() 
{
Serial.begin(115200);
phone.begin(9600);
pinMode(buttonPinINPUT); 
 }

 

 
void loop() 
{
if(
phone.available() >0)
{
incoming_char=phone.read();    //Get the character from the cellular serial port.

Serial.print(incoming_char);  //Print the incoming character to the terminal.
}

if(
Serial.available() >0)
{
incoming_char=Serial.read();  //Get the character coming from the terminal

phone.print(incoming_char);    //Send the character to the cellular module.