Figure 1 Chest, Back and Hand
Figure 2 Control Diagram
To realize the function mentioned above, we shall not let the control signal of handle directly sent to the control panel of steering engine through the wireless module. Instead, we need a module which can send the instruction to the control panel of steering engine on the one hand and realize voice playing on the other hand after receiving the signal of handle.
Figure 4 Flyduino
Figure 5 Voice Playing Module DFRduino Player V2.0
After devices are selected, we may start modifying. Step I, install the voice playing module. Before installation, we shall store the voice files into the SD card firstly. Based on the robot's operations, we have found voices for following operations, and name each file according the table below. You may also choose voices from The King of Fighters and Street Fighter, etc. according to your own hobbies. However, the files must be consistent.
Figure 6 Installation of Voice Module
The cables connected with the voice module need to pass through the chest of robot, to connect Flyduino in the rear.
Figure 7 Control Cables Passing through the Chest
At last, as shown in Figure 8, fix the chest on the robot.
Figure 8 Fixing of Robot Chest
Step II, install Flyduino. There is no installation hole on Flyduino, so we fix it on the back by use of XBee wireless data transmission port on its back. As shown in Figure 9, we build two slots on the back firstly with the size consistent with the wireless data transmission port.
Figure 9 Installation Slots on the Back
Then, as shown in Figure 10, Figure 11, fix Flyduino on the back, and insert the wireless module used before at last.
Figure 10 Flyduino Fixed
Figure 11 Insertion of Wireless Module
Step III, connect three parts: Flyduino, voice playing module and control panel of steering engine.
#define MusicEnd 6
SoftwareSerial mySerial1(2, 3);
SoftwareSerial mySerial2(4, 5);
char w;
int flag=1;
void setup()
{
Serial.begin(57600);
mySerial1.begin(19200);
mySerial2.begin(9600);
pinMode(MusicEnd, INPUT);
}
void loop()
{
if(Serial.available()>0)
{
w = Serial.read();
if(flag==1)
{
if(w==1||w==2||w==7||w==8||w==12||w==13||w==14||w==15)
{
mySerial1.print("\\yidong\r\n");
}
else if(w==3||w==4)
mySerial1.print("\\bai\r\n");
else if(w==5||w==6)
mySerial1.print("\\quan\r\n");
else if(w==9||w==16)
mySerial1.print("\\dao\r\n");
}
if(w!=0)
{
mySerial2.write(w);
flag=0;
}
if(digitalRead(MusicEnd) == LOW)
flag=1;
}
Figure 12 Connection of Each Part
Figure 13 Installation of Back
So far, our robot is completed. Let's fight!!
To be continued...