General GravityArduino

Using Button Instead of Wake Word. Gravity: Offline Language Learning Voice Recognition Sensor

userHead jevjames14 2025-07-09 04:18:55 122 Views1 Replies

Hello. I just got started with this module and was wondering if there was a way to have the module “wake up” with a push button instead of using the wake up word? I couldn't find where in the base I2C code it listens for the wake up word so I could try to manipulate it. Any help will be greatly appreciated!

2025-07-09 04:43:21

Should have did some more digging before posting. If you follow the “Halloween Automation” project (https://community.dfrobot.com/makelog-313552.html) you can give the command through the code by setting the ID to “1”. If using the I2C example code the command looks like this: asr.playByCMDID(1)

 

I cant post the full code but its the exact example code with this added to the loop. Now i can wake the module using either the wake word or a push button.

 

pushButtonState = digitalRead(pushButton);

  if (pushButtonState == LOW)

  {

    asr.playByCMDID(1);   // Wake-up command

  }

 

userHeadPic jevjames14