Hello guys,
im kinda new to this forum, im having problem with my arduino bitVoicer speech recognition.
#include <Bitvoicer11\BitVoicer11.h>
#include <IRRemote\IRremote.h>
#include <IRRemote\IRremoteInt.h>
#define TIMES_TO_RUN 3
//Instantiates the BitVoicerSerial class and IRsend
BitVoicerSerial bvSerial = BitVoicerSerial();
IRsend irsend;
int ledPin = 13;
void setup()
{
//Starts serial communication at 9600 bps
Serial.begin(9600);
//Sets digital pin 13 as OUTPUT
pinMode(ledPin, OUTPUT);
//Turns off pin 13
digitalWrite(ledPin, LOW);
}
void loop()
{
bvSerial.getData();
if (bvSerial.strData == "")
return;
else if (bvSerial.strData == "up"){
digitalWrite(ledPin, HIGH); //blink the indicator led to ensure command accepted
delay(200);
digitalWrite(ledPin, LOW);
delay(200);
for (int i = 0; i < TIMES_TO_RUN; i++){
irsend.sendNEC(0x213CAC53, 32); // Hex code for channeling up
delay(1000);
}
bvSerial.strData == "";
}
}
this is my simple code, the problem is that whenever i say "up" and the command is executed, it repeats it over and over, the bitvoicer program sends the command only 1 times to the serial, but somehow it keeps repeating and the led is blinking forever.
Thanks for any kind of help.
Assaf.