The DC motor can be turned or stopped by voice recognition.
- DC motor(I used the gear motor that comes with the AI Robot Kit here.)
- obniz Board
- Mobile batteries, etc.
- PC or Android smartphone
- (It’s easier to see the rotation if you have a tire or flag.)
Please note that the Web Speech API used in this article’s program does not support speech recognition in most browsers other than Chrome. In addition, the iOS version of the Chrome app is not supported, so please use Android when using a smartphone.
How to make
Connect the motor to the obniz board as shown in the table, referring to the DC motor parts library.
|0||OUT1 (either one of them).|
|1||OUT2 (either one of them).|
Press RECODE to record until you press STOP. In the meantime, please talk to them.
The corresponding phrases are as follows.
- 「Turn it around.」 → The DC motor spins.
- 「Stop it.」 → The DC motor stops rotating.
If a pop-up message appears asking for permission to use the microphone, press “Allow”.