I'am trying to apply USSD operation with variable codes, for example this piece of code return my account balance:
gsm.SimpleWriteln("AT+CUSD=1,\"*100#\"");
i want to change "*100#" to variable so gsm.SimpleWrite uses what the variable contains. I want to find how to make it work like this:
gsm.SimpleWriteln("AT+CUSD=1,\"Variable\"");
EDIT: here is my code to give you a better view. it return balance in serial monitor.
#include "SIM900.h"
void setup()
{
Serial.begin(9600);
Serial.println("GSM Shield testing.");
if (gsm.begin(9600))
Serial.println("\nstatus=READY");
else Serial.println("\nstatus=IDLE");
gsm.SimpleWriteln("AT+CUSD=1,\"*100#\"");
delay(10000);
char msg[200];
gsm.read(msg, 200);
Serial.print("resp: ");
Serial.println(msg);
}
void loop()
{
}