Manual
Table Of Contents
- 1. Introduction
- 2. FlickerLED Demo
- 3. AlarmLED Demo
- 4. AdjustLED Demo
- 5. Button Demo
- 6. SeedVoiceLED Demo
- 7. MoveBlock Demo
- 8. SeedVoiceDobot Demo
- 9. JoyStick Demo
- 10. DobotPixy Demo
- Appendix A Common Function Description
- Appendix B Installing Suction Cup Kit
- Appendix C Pixy Install and Configure Pixy
- Appendix D Vision Recognition Initialization Process
- Appendix E Multiplexed I/O Interface Description of V1 Dobot Magician
- Appendix F Multiplexed I/O Interface Description of V2 Dobot Magician
Arduino Kit Demo Description 6 SeedVoiceLED Demo
Issue V2.1 (2019-12-05) Demo Description Copyright © Yuejiang Technology Co., Ltd
16
Serial.begin(115200);
SmartKit_Init();
SmartKit_VoiceENGStart();
Serial.println("Start...");
}
Control the LED indicator by voice commands.
Program 6.3 Control the LED indicator by voice commands
void loop()
{
if(SmartKit_VoiceENGVoiceCheck(1) == TRUE)
{
SmartKit_LedTurn(RED,ON);
SmartKit_LedTurn(BLUE,ON);
SmartKit_LedTurn(GREEN,ON);
Serial.println(voiceBuffer[0]);
}
else if(SmartKit_VoiceENGVoiceCheck(2) == TRUE)
{
SmartKit_LedTurn(RED,OFF);
SmartKit_LedTurn(BLUE,OFF);
SmartKit_LedTurn(GREEN,OFF);
Serial.println(voiceBuffer[1]);
}
}
NOTICE
Grove speech recognizer only supports 22 voice commands without user-defined. The
commands with values are as shown in Program 6.4.
Program 6.4 Command description
const char *voiceBuffer[] =
{
"Turn on the light", //return 1
"Turn off the light", //return 2
"Play music", //return 3
"Pause", //return 4