how to code HB100?

I have attached HB100 to analog pin .the data is coming like sine wave.without obstacle its giving values from 350 to 550 analog values.with obstacle gives sine wave.how to detect sine wave?

static int i;
void setup() 
{
  // put your setup code here, to run once:
  Serial.begin(9600);
  pinMode(A0,INPUT);

}

void loop()
{
  // put your main code here, to run repeatedly:
  int a=analogRead(A0);
  Serial.print(a);
  Serial.print("  ");
  if(a<10)
    i=i+1;
   Serial.print(i);
  delay(200);
  Serial.println();
}