serial read failed

help, why serial read filed ?

#include <SoftwareSerial.h>
SoftwareSerial myGsm(6,7);


void setup()
{
  char respon;
  myGsm.begin(9600);
  Serial.begin(9600);
  delay(500);

  respon = myGsm.read();
  myGsm.println("AT+CPIN?");
  // myGsm.write("AT+CPIN?\r\n");
  delay(500);
  printSerialData();
  if (respon == "+CPIN: READY") {
    myGsm.println("success read AT+CPIN?");
    delay(500);
    printSerialData();
  }
}

void loop()
{
 
}


void printSerialData()
{
  while (myGsm.available() != 0)
    Serial.write(myGsm.read());
}

help, wht serial read filed ?

Wuh?

AWOL:
Wuh?

why sir, not wuh :smiley:

help, why serial read filed ?

Wuh?

  char respon;
  ...
  if (respon == "+CPIN: READY")

Doesn't seem likely, does it?

AWOL:

  char respon;

...
  if (respon == "+CPIN: READY")


Doesn't seem likely, does it?

is there an easy example sir ?

Robin2's serial handling basics tutorial springs to mind.

AWOL:
Robin2's serial handling basics tutorial springs to mind.

how apply on my case sir ?

beryindo:
how apply on my case sir ?

Well you should maybe take a little time to actually read it first. 6 whole minutes is not long enough. Go read and try to gasp learn something. Why should we help you if you're not willing to put in any effort at all? You should be able to have some more specific questions when you get done.

Have a look at the examples in Serial Input Basics - simple reliable ways to receive data.

...R