serial monitor help!!

hey guys , i wanted to know how to get only the first integer value from serial monitor and after that use the second and the later value as a different int .also is there a way to store the first int value.i have written the following code (it is not yet completed )to indicate the nearest direction using an hc-05 module

int led_north =5;
int led_south =4;
int led_east= 7;
int led_west =6;
int  bluevalue  ;
void setup()
{
  Serial.begin(9600);
  Serial.println('AT');
  delay (100);
  Serial.println('AT+INQM=1,9,48');
  delay (100);
  Serial.println('AT+INQ');
  delay(100);
  Serial.println('+INQ:1234:56:0,1F1F,FFC0');
  delay(100);
  pinMode(led_north,OUTPUT);  
  pinMode(led_south,OUTPUT); 
  pinMode(led_east,OUTPUT);
  pinMode(led_west,OUTPUT); 
  delay (1000);



}
void loop() 
{ 
  if (Serial.available() < 2 )
  {
    bluevalue=Serial.read();
    delay(1000);
    pinMode(led_north,HIGH);
    delay(500);
    pinMode(led_north,LOW);
  }
  else
    led_east=Serial.read();
  {
    if (bluevalue < led_east);
    {
      pinMode(led_north,HIGH);
    }
  }
}

what changes should i make so that the code works as i mentioned above
thanks in advance

 Serial.println('AT+INQM=1,9,48');

Double quotes - I think this has already been pointed-out.

AWOL:

 Serial.println('AT+INQM=1,9,48');

Double quotes - I think this has already been pointed-out.

thanks is this right

int led_north =5;
int led_south =4;
int led_east= 7;
int led_west =6;
int  bluevalue  ;
int new_value ;
void setup()
{
  Serial.begin(9600);
  Serial.println("AT");
  delay (100);
  Serial.println("AT+INQM=1,9,48");
  delay (100);
  Serial.println("AT+INQ");
  delay(100);
  Serial.println("+INQ:1234:56:0,1F1F,FFC0");
  delay(100);
  pinMode(led_north,OUTPUT);  
  pinMode(led_south,OUTPUT); 
  pinMode(led_east,OUTPUT);
  pinMode(led_west,OUTPUT); 
  delay (1000);



}
void loop() 
{ 
  if (Serial.available() < 2 )
  {
    bluevalue=Serial.read();
    delay(1000);
    pinMode(led_north,HIGH);
    delay(500);
    pinMode(led_north,LOW);
  }
  else
    led_east=Serial.read();
  {
    if (bluevalue < led_east);
    {
      pinMode(led_north,HIGH);
     
    }
  }
}
  if (Serial.available() < 2 )
  {
    bluevalue=Serial.read();

If there’s nothing there to read (0 < 2), read it anyway?

manansh:
hey guys , i wanted to know how to get only the first integer value from serial monitor and after that use the second and the later value as a different int .also is there a way to store the first int value.i have written the following code (it is not yet completed )to indicate the nearest direction using an hc-05 module what changes should i make so that the code works as i mentioned above
thanks in advance

Here’s a nice piece of code that reads information from the serial port and store it in a buffer. You can then extract numeric values from the buffer using atoi() or atof() or parse out parts simply by indexing into the buffer.

char buffer [32];
int length;

length = readline (buffer, 32, 1);

// buffer is a pre-allocated space to store the data
// limit is how many characters to accept (prevent overrunning the buffer)
// echo: 1 = echo typed input, 0 = don't echo
int readline (char *buf, int limit, int echo)
{
    char ch = 0;
    int cnt = 0;
    *buf = 0;
    while (!(ch == 0x0d) || (ch == 0x0a)) {
        if (Serial.available()) {
            ch = Serial.read();
            if (ch == 0x08) {
                if (cnt > 0) {
                    if (echo) {
                        Serial.print ((char) 0x08);
                        Serial.print ((char) 0x20);
                        Serial.print ((char) 0x08);
                    }
                    cnt--;
                    buf[cnt] = 0;
                } else {
                    Serial.print ((char) 0x07);
                }
            } else if (ch != 0x0d) {
                if (cnt < (limit - 1)) {
                    if (echo) {
                        Serial.print ((char) ch);
                    }
                    buf[cnt++] = ch;
                    buf[cnt] = 0;
                } else if (echo) {
                    Serial.print ((char) 0x07);
                }
            }
        }
    }
    return cnt;
}