Ardruino with motion sensor using HC-SR04 and voice recognition using bitvoicer

Hi i need help i will attach my code then someone please help me to turn off the alarm using bitvoicer.

try.txt (1.29 KB)

code tags, because nobody likes to download a plain text document

Also, this is an extremely vauge post, dont expect much help at all unless you want to put more work into this question…

#define trigPin 12
#define echoPin 13
#include <BitVoicer11.h>

BitVoicerSerial bvSerial = BitVoicerSerial();
byte dataType = 4;

int Buzzer = 8;

void setup() {
  Serial.begin (9600);
  pinMode(trigPin, OUTPUT);
  pinMode(echoPin, INPUT);
  pinMode(Buzzer, OUTPUT);

}

void loop() {

   int duration, distance;
  digitalWrite(trigPin, HIGH);
  delayMicroseconds(1000);
  digitalWrite(trigPin, LOW);
  duration = pulseIn(echoPin, HIGH);
  distance = (duration/2) / 29.1;
  if (distance >= 80 || distance <= 0){
    Serial.println("no object detected");
    digitalWrite(Buzzer, LOW);
 
  }
  
 
  else {
    Serial.println("object detected");
    tone(Buzzer, 400);         
    delay(500);
    tone(Buzzer, 800);         
    delay(500);
    tone(Buzzer, 400);          
    delay(500);
    tone(Buzzer, 800);        
    delay(500);
    tone(Buzzer, 400);         
    delay(500);
    tone(Buzzer, 800);          
    delay(500);

  }
  return;

}

void serialEvent()
{
    //Reads the serial bugger and stores the received data type. 
    dataType = bvSerial.getData();
    
    //check if the data type is the same as the one in coming from bitvoicer.
    if (dataType == BV_INT)
    {
       digitalWrite(Buzzer, LOW);
       delay(50);
    }
    
}

Hi sir, how can i upload it without notepad? Yes, ive seen that code in instructables, sir i need help regarding codes, i have a HC-SR04 motion sensor, and a piezo for the alarm, i need to know how to turn it off using bitvoicer, or any other voice command that you can refer me

This Instructables post looks promising