voice controlled spider robot(12 servos) using two xbee s2 and voice module v3

I have to make the above told project , voice module will process voice commands at transmission end and will operate the spider robot at receiver’s end. I have tried different approaches but baudrate of Voice module is 115200 , can u please send me the coding of transmission and receoving end.
sample code for transmission is
/**


  • @file vr_sample_control_led.ino
  • @author JiapengLi
  • @brief This file provides a demostration on
    how to control led by using VoiceRecognitionModule

  • @note:
    voice control led

2013/06/13 Initial version.
*/

#include <SoftwareSerial.h>
#include “VoiceRecognitionV3.h”

/**
Connection
Arduino VoiceRecognitionModule
2 -------> TX
3 -------> RX
*/
VR myVR(2,3); // 2:RX 3:TX, you can choose your favourite pins.

uint8_t records[7]; // save record
uint8_t buf[64];

int led = 13;

#define onRecord (0)
#define offRecord (1)

/**
@brief Print signature, if the character is invisible,
print hexible value instead.
@param buf → command length
len → number of parameters
/
void printSignature(uint8_t buf, int len)
{
int i;
for(i=0; i<len; i++){
if(buf_>0x19 && buf
<0x7F){
_
_ Serial.write(buf*);
}
else{
Serial.print("[");
Serial.print(buf, HEX);
Serial.print("]");
}
}
}
/**
@brief Print signature, if the character is invisible,
print hexible value instead.
@param buf → VR module return value when voice is recognized.
buf[0] → Group mode(FF: None Group, 0x8n: User, 0x0n:System*

* buf[1] → number of record which is recognized.
buf[2] → Recognizer index(position) value of the recognized record.
buf[3] → Signature length*

* buf[4]~buf[n] → Signature*
/
void printVR(uint8_t *buf)
{
Serial.println(“VR Index\tGroup\tRecordNum\tSignature”);
Serial.print(buf[2], DEC);
Serial.print("\t\t");
if(buf[0] == 0xFF){
Serial.print(“NONE”);
}
else if(buf[0]&0x80){
Serial.print(“UG “);
Serial.print(buf[0]&(~0x80), DEC);
}
else{
Serial.print(“SG “);
Serial.print(buf[0], DEC);
}
Serial.print(”\t”);
Serial.print(buf[1], DEC);
Serial.print(”\t\t”);
if(buf[3]>0){
printSignature(buf+4, buf[3]);
}
else{
Serial.print(“NONE”);
}
Serial.println("\r\n");
}
void setup()
{
/** initialize /
myVR.begin(9600);
_

* Serial.begin(115200);*
* Serial.println(“Elechouse Voice Recognition V3 Module\r\nControl LED sample”);*

* pinMode(led, OUTPUT);*

* if(myVR.clear() == 0){*
* Serial.println(“Recognizer cleared.”);*
* }else{*
* Serial.println(“Not find VoiceRecognitionModule.”);*
* Serial.println(“Please check connection and restart Arduino.”);*
* while(1);*
* }*

* if(myVR.load((uint8_t)onRecord) >= 0){
_ Serial.println(“onRecord loaded”);
}*_

* if(myVR.load((uint8_t)offRecord) >= 0){
_ Serial.println(“offRecord loaded”);
}
}
void loop()
{
int ret;
ret = myVR.recognize(buf, 50);
if(ret>0){
switch(buf[1]){
case onRecord:
/** turn on LED /
digitalWrite(led, HIGH);

* break;
case offRecord:
/** turn off LED/

* digitalWrite(led, LOW);
break;
default:
Serial.println(“Record function undefined”);
break;
}
/** voice recognized /
printVR(buf);

* }
}
What should be for transmitter and receiver ? what should be baud rate and setup of of xbees in XCTU ? kindly help, I relied on Arduino becoz it’s wonderful but I am having problems, kindly end me code keeping in view the apparatus.
two Xbee s2
two Arduino uno
voice module v3 elechouse
Spider robot 6 legs_

vr_sample_control_led.ino (3.3 KB)*

The first place to start is #7 below:

http://forum.arduino.cc/index.php/topic,148850.0.html

I have tried different approaches but baudrate of Voice module is 115200 , can u please send me the coding of transmission and receoving end. sample code for transmission is

What are we , a program writing service ?

Hi, I connected the voice recognition module V3 with Arduino Mega 2560 but performing sketches for example in the library can not operate the module. If I run, vr_sample_train, and I type the command "train 0", the LED flashes yellow then red LED lights and finally the two LEDs flash to the correct setting of the item. Instead the monitor serial I always get "train Timeout". If I run the sketch "vr_sample_check_baud_rate" the serial monitor always writes

Elechouse Voice Recognition Module V3 Check Baud Rate sample Check baud rate failed. Please check the connection, and reset arduino

have encountered the same problem?

Thank you for your kind reply, Narciso

U've to set baud rate to 115200 also in the serial monitor, also sometime the pin configuration of tx and rx is shuffled e.g tx > 2 rx > 3 but in real it is tx > 3 rx > 2,, give it a try. u'd get the results

the command is sigtrain 0 , load 0 etc

Before you have to change the baud rate of the Voice Module from 9600 to 19200 baud,
you can do this by connecting the voice module with usb to rs232 ttl adaptor direct to your laptop and use the program AccessPort.
With the program AccessPort you have to change the baud rate of the voice module from 9600 to 19200 baud, the same you have to do in the arduino code. The voice module can only work with the older version of Arduino software version 1.0 and 1.0.6 higher versions will not work. I test it with windows 7 ultimate 64 bit system. Use the manual and program from the website of Elechouse, in the manual you will find information how to change the baud rate of the voice module and a link for downloading the program AccessPort. In the library codes you must change all myVR.begin(9600); to myVR.begin(19200);

After all this you can start to enjoy your voice module.

Use this led sketch below I change the baud rate already in the code;

/**


  • @file vr_sample_control_led.ino
  • @author JiapengLi
  • @brief This file provides a demostration on
    how to control led by using VoiceRecognitionModule

  • @note:
    voice control led

2013/06/13 Initial version.
*/

#include <SoftwareSerial.h>
#include “VoiceRecognitionV3.h”

/**
Connection
Arduino VoiceRecognitionModule
2 -------> TX
3 -------> RX
*/
VR myVR(2,3); // 2:RX 3:TX, you can choose your favourite pins.

uint8_t records[7]; // save record
uint8_t buf[64];

int led = 13; // This is the led onboard which will be use to swich on and off

#define onRecord (0) // Use the command (sigtrain 0 On) in Trainer to make record On
#define offRecord (1) // Use the command (sigtrain 1 Off) in Trainer to make record Off

/**
@brief Print signature, if the character is invisible,
print hexible value instead.
@param buf → command length
len → number of parameters
/
void printSignature(uint8_t buf, int len)
{
int i;
for(i=0; i<len; i++){
if(buf_>0x19 && buf
<0x7F){
_
_ Serial.write(buf*);
}
else{
Serial.print("[");
Serial.print(buf, HEX);
Serial.print("]");
}
}
}
/**
@brief Print signature, if the character is invisible,
print hexible value instead.
@param buf → VR module return value when voice is recognized.
buf[0] → Group mode(FF: None Group, 0x8n: User, 0x0n:System*

* buf[1] → number of record which is recognized.
buf[2] → Recognizer index(position) value of the recognized record.
buf[3] → Signature length*

* buf[4]~buf[n] → Signature*
/
void printVR(uint8_t *buf)
{
Serial.println(“VR Index\tGroup\tRecordNum\tSignature”);
Serial.print(buf[2], DEC);
Serial.print("\t\t");
if(buf[0] == 0xFF){
Serial.print(“NONE”);
}
else if(buf[0]&0x80){
Serial.print(“UG “);
Serial.print(buf[0]&(~0x80), DEC);
}
else{
Serial.print(“SG “);
Serial.print(buf[0], DEC);
}
Serial.print(”\t”);
Serial.print(buf[1], DEC);
Serial.print(”\t\t”);*_

* if(buf[3]>0){*
* printSignature(buf+4, buf[3]);*
* }*
* else{*
* Serial.print(“NONE”);*
* }*
* Serial.println("\r\n");*
}
void setup()
{
_ /** initialize /
myVR.begin(19200); // Baud rate Voice module*_

* Serial.begin(115200); // Baud rate Monitor*
* Serial.println(“Elechouse Voice Recognition V3 Module\r\nControl LED sample”);*

* pinMode(led, OUTPUT); // Set ledpin 13 as output*

* if(myVR.clear() == 0){*
* Serial.println(“Recognizer cleared.”);*
* }else{*
* Serial.println(“Not find VoiceRecognitionModule.”);*
* Serial.println(“Please check connection and restart Arduino.”);*
* while(1);*
* }*

* if(myVR.load((uint8_t)onRecord) >= 0){ // Load onRecord*
* Serial.println(“onRecord loaded”);*
* }*

* if(myVR.load((uint8_t)offRecord) >= 0){ // Load offRecord*
* Serial.println(“offRecord loaded”);*
* }*
}
void loop()
{
* int ret;*
* ret = myVR.recognize(buf, 50);*
* if(ret>0){ // Here the commands will be executed*
* switch(buf[1]){*
* case onRecord: // If voice = on then turn the led on*
_ /** turn on LED /
digitalWrite(led, HIGH); // led on*

* Serial.println(“The led is on”);
break; // Leave the loop*

* case offRecord: // If voice = off then turn the led off*
/** turn off LED*/
* digitalWrite(led, LOW); // led off*
* Serial.println(“The led is off”);
break; // Leave the loop*

* default:
Serial.println(“Record function undefined”);
break; // Leave the loop*

* }
/** voice recognized /
printVR(buf);

* }
}*_

hello friends have problems with elechouse v3.1 module can not change the communication speed 9600-19200 the AA0311040A command does nothing ever stays in AA0311000A? WHAT CAN I DO

Please learn how to use the forum toolbars.
Code should be posted using the CODETAGS toolbutton “</>”. It’s the FIRST button on the LEFT.
When posted properly, the code looks like this:

 /**
  ******************************************************************************
  * @file    vr_sample_control_led.ino
  * @author  JiapengLi
  * @brief   This file provides a demostration on 
              how to control led by using VoiceRecognitionModule
  ******************************************************************************
  * @note:
        voice control led
  ******************************************************************************
  * @section  HISTORY
    
    2013/06/13    Initial version.
  */
  
#include <SoftwareSerial.h>
#include "VoiceRecognitionV3.h"

/**        
  Connection
  Arduino    VoiceRecognitionModule
   2   ------->     TX
   3   ------->     RX
*/
VR myVR(2,3);    // 2:RX 3:TX, you can choose your favourite pins.

uint8_t records[7]; // save record
uint8_t buf[64];

int led = 13; // This is the led onboard which will be use to swich on and off

#define onRecord    (0) // Use the command (sigtrain 0 On) in Trainer to make record On
#define offRecord   (1) // Use the command (sigtrain 1 Off) in Trainer to make record Off

/**
  @brief   Print signature, if the character is invisible, 
           print hexible value instead.
  @param   buf     --> command length
           len     --> number of parameters
*/
void printSignature(uint8_t *buf, int len)
{
  int i;
  for(i=0; i<len; i++){
    if(buf>0x19 && buf<0x7F){
      Serial.write(buf);
    }
    else{
      Serial.print("[");
      Serial.print(buf, HEX);
      Serial.print("]");
    }
  }
}

/**
  @brief   Print signature, if the character is invisible, 
           print hexible value instead.
  @param   buf  -->  VR module return value when voice is recognized.
             buf[0]  -->  Group mode(FF: None Group, 0x8n: User, 0x0n:System
             buf[1]  -->  number of record which is recognized. 
             buf[2]  -->  Recognizer index(position) value of the recognized record.
             buf[3]  -->  Signature length
             buf[4]~buf[n] --> Signature
*/
void printVR(uint8_t *buf)
{
  Serial.println("VR Index\tGroup\tRecordNum\tSignature");

  Serial.print(buf[2], DEC);
  Serial.print("\t\t");

  if(buf[0] == 0xFF){
    Serial.print("NONE");
  }
  else if(buf[0]&0x80){
    Serial.print("UG ");
    Serial.print(buf[0]&(~0x80), DEC);
  }
  else{
    Serial.print("SG ");
    Serial.print(buf[0], DEC);
  }
  Serial.print("\t");
  Serial.print(buf[1], DEC);
  Serial.print("\t\t");
  
  if(buf[3]>0){
    printSignature(buf+4, buf[3]);
  }
  else{
    Serial.print("NONE");
  }
  Serial.println("\r\n");
}

void setup()
{
  /** initialize */
  myVR.begin(19200); // Baud rate Voice module
  
  Serial.begin(115200); // Baud rate Monitor
  Serial.println("Elechouse Voice Recognition V3 Module\r\nControl LED sample");
  
  pinMode(led, OUTPUT); // Set ledpin 13 as output
    
  if(myVR.clear() == 0){
    Serial.println("Recognizer cleared.");
  }else{
    Serial.println("Not find VoiceRecognitionModule.");
    Serial.println("Please check connection and restart Arduino.");
    while(1);
  }
  
  if(myVR.load((uint8_t)onRecord) >= 0){ // Load onRecord
    Serial.println("onRecord loaded");
  }
  
  if(myVR.load((uint8_t)offRecord) >= 0){ // Load offRecord
    Serial.println("offRecord loaded");
  }
}

void loop()
{
  int ret;
  ret = myVR.recognize(buf, 50);
  if(ret>0){ // Here the commands will be executed
    switch(buf[1]){
      case onRecord: // If voice = on then turn the led on
        /** turn on LED */
        digitalWrite(led, HIGH); // led on
        Serial.println("The led is on");
        break; // Leave the loop
      case offRecord: // If voice = off then turn the led off
        /** turn off LED*/
        digitalWrite(led, LOW); // led off
        Serial.println("The led is off");
        break; // Leave the loop
      default:
        Serial.println("Record function undefined");
        break; // Leave the loop
    }
    /** voice recognized */
    printVR(buf);
  }
}

buenos días compañeros me he tomado la atribución de modificar la librería del modulo elechosue v3.1 para que trabaje con el arduino mega ya que nadie me quiso ayudar.

esta es la libreria modificada para trabar con el serial1 de l mega a 9600 o como tengas tu modulo

http://www.mediafire.com/download/987ilt9d28q8mwc/moduloVoz.rar