Recieving Serial Data Packets

I'm currently working with the Arduino Pro board. I am connecting the board to a finger print scanner. The scanner already has a control board on it, all I need the Arduino for is to tell the scanner control board what to do. The problem that I am having is that there are certain response that the scanner control board sends back. These responses are sent in data packets. I'm just not sure how to go about writing code to check for the response I am looking for.

For this first packet I don't need to find anything special, just need to make sure that that is the response that I received. I would like to be able to do this by using something such as an if statement.

ex.

if(digitalRead(2) == EF, 01, FF, FF, FF, FF, 07, 00, 03, 00, 00, 0A)

Any help would be great.

You cant do that with digitalread().

Check the reference section for how to use the serial communication commands.

Dniggli,

It sounds like there will be two steps in your process:

  1. Receive the data packet.
  2. Check the packet contents.

Ideally, you would write two functions to perform these steps. Do you know how to do step 1, receive the data packet?

Regards,

-Mike