Pages: 1 2 [3]   Go Down
Author Topic: Voice Recognition Module programming issue  (Read 4789 times)
0 Members and 1 Guest are viewing this topic.
Offline Offline
Full Member
***
Karma: 0
Posts: 132
http://roverduino.blogspot.com/ http://uhebeuav.co.za
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Next step with the VR module

I am now moving on and trying to get a setup menu going to teach the VR module new words via Arduino and not TTL converter, but this is proving difficult. I normally short GND to reset pin on the arduino and use the TX RX pins of the arduino to connect to the VR module and teach it new words. but im using software serial to connect to my VR module i need the Arduino to be running to convert from software to real Serial so i can see it in the terminal . here is the void function code im trying to use.
Code:
void learn()
 */{
  Serial.println("learn mode");
  while(mySerial.available())
  {
    learnState = mySerial.read();
    Serial.println(learnState,HEX);
    mySerial.write(0xAA);
    mySerial.write(0x36); // Switch module into compact mode
    delay(1000);
    mySerial.write(0xAA);
    mySerial.write(0x04);
    delay(1000);
    mySerial.write(0xAA);
    mySerial.write(0x11);
    if (learnState == 0x46)
    {
      Serial.println("Group 1 recorder succesfully");
      Serial.println("Start of Group 2");
      mySerial.write(0xAA);
      mySerial.write(0x12);
      delay(1000);
      if (learnState == 0x47)
      {
        Serial.println("Group 2 recorder succesfully");
        Serial.println("Start of Group 3");
        mySerial.write(0xAA);
        mySerial.write(0x12);
        delay(1000);
        if (learnState == 0x47)
        {
          Serial.println("Group 3 recorder succesfully");
          Serial.println("Importing Groups");
          mySerial.write(0xAA);
          mySerial.write(0x21);
          delay(1000);
          mySerial.write(0xAA);
          mySerial.write(0x22);
          delay(1000);
          mySerial.write(0xAA);
          mySerial.write(0x23);
          delay(1000);
          mySerial.write(0xAA);
          delay(1000);
          if (learnState == 0xCC)
          {
            Serial.println("Programming succesfully");
          }
        }
      }
    }
  }
}

the problem is when i view the terminal the result is printed one character at a time as the loop cycles instead of words printing for example.

when i learn new words via hyper terminal i get a message "START" then i say the first word it will respond "AGAIN" or "DIFFERENT" if i didnt speak clearly. but when i run my learn void it prints the hex for the word "START" one character at a time under in println format and not print.
like so
S// 1 cycle
T// 2 cycle
A// 3 cycle
R// 4 cycle
T// 5 cycle

any idea how i can make it work ?
Logged

He who does not try ,does not fail ,does not learn not to fail again http://powerduino.blogspot.com/

Pages: 1 2 [3]   Go Up
Jump to: