It's said that -
call of overloades 'println(const char [34],char [44])' is ambiguous
#include <SoftwareSerial.h>
SoftwareSerial mySerial(10, 11); // RX, TX
int test=7;
void setup()
{
pinMode(test,INPUT);
pinMode(13,OUTPUT);
Serial.begin(19200); // Open serial communications and wait for port to open:
delay(1500);
Serial.println("Ready to work!");
mySerial.begin(19200);
delay(1500);
Serial.println("Modem connection is on!");
}
void loop()
{
if (digitalRead(test)==HIGH)
{
char in_csq;
char full[44];
mySerial.println("AT+sbdi");
delay(16000);
if (mySerial.available()> 7)
{//start of answer
for (int csq_num=0;csq_num<43;csq_num++)
{//start reading
full[csq_num]=mySerial.read();
}//end of reading
char * pch;
Serial.println("spliting string \"%\" into token: \n" ,full);
pch = strtok(full,",");
while (pch !=NULL)
{
Serial.println("%s\n",pch);
pch=strtok(NULL,",");
}
}//end of reading
}
}
Also I have try the second code that was offer by
guix
and I think the problem is that this is not the full answer - this is my full answer:
AT+sbdi
+SBDI: 2,41,2,1,3,8
OK
but when I write it like it is I still don't get nothing....
this is how I wrote it:
int16_t a1,a2,a3,a4,a5,a6;
// sscanf(full,"at+sbdi +sbdi: %hu,%hu,%hu,%hu,%hu,%hu" OK,&a1, &a2, &a3, &a4, &a5, &a6);
// printf("answer1= %hu\n 2 = %hu\n 3 = %hu\n 4= %hu\n 5=%hu\n 6=%hu\n " , a1,a2,a3,a4,a5,a6);