---
+ Post New Thread
Results 1 to 3 of 3
  1. #1
    Member level 3
    Points: 544, Level: 4

    Join Date
    Aug 2013
    Location
    Singrauli, India, India
    Posts
    65
    Helped
    0 / 0
    Points
    544
    Level
    4

    how to use Serial.find() function in arduino

    should anyone give short example of how to use Serial.find() function in arduino .please help me

    •   Alt1st January 2014, 06:29

      advertising

        
       

  2. #2
    Advanced Member level 5
    Points: 20,224, Level: 34

    Join Date
    May 2009
    Location
    Prime Meridian
    Posts
    3,056
    Helped
    885 / 885
    Points
    20,224
    Level
    34

    Re: how to use Serial.find() function in arduino

    Hi,

    The Arduino homepage /reference and forum is you friend here..

    http://arduino.cc/en/Serial/Find


    1 members found this post helpful.

    •   Alt1st January 2014, 10:54

      advertising

        
       

  3. #3
    Member level 4
    Points: 1,555, Level: 9
    themask's Avatar
    Join Date
    Mar 2008
    Location
    Philippines
    Posts
    79
    Helped
    13 / 13
    Points
    1,555
    Level
    9

    Re: how to use Serial.find() function in arduino

    Here is a short example:

    Code:
    boolean isOKFound = Serial.find("OK\r\n");    //Search for 'OK' string response from GSM module
                                                  //return true if found, or false if string is not found after 1 second
    //or
    
    Serial.setTimeout(5000);
    boolean isOKFound = Serial.find("OK\r\n");    //Wait for 'OK' for 5 seconds
    Ask, Seek, and Knock


    1 members found this post helpful.

+ Post New Thread
Please login