Now I want to take you a through a few more steps so that you can turn your treebot into an interactive installation. I am not going to walk you through another motion-triggered, pre-recorded animatronic. Nor am I going to expand on the remote controlling of the tree, I have already shown you some simple techniques for that (In the first Instructable). I am going to show you how to make your Processing sketch recognize verbal commands, and perform both some useful and useless (but entertaining) things. If you follow through successfully you will have made a your push-button-reactive robot into one that listens and responds to your voice, just as a good tree should.
Here's what the tree will do when finished.
Remove these ads by
Signing UpStep 1: Things that you will need
- One Animatronic Christmas Tree, or suitably serial controlled animatronic. (Maybe you have made a talking teddy, or grapefruit instead)
- A computer running Processing, which you already have if you have completed makiing the first item on the list.













































Visit Our Store »
Go Pro Today »




Exception in thread "Animation Thread" java.lang.NullPointerException
at voce.SpeechRecognizer.getQueueSize(SpeechRecognizer.java:152)
at voce.SpeechInterface.getRecognizerQueueSize(SpeechInterface.java:149)
at My_voice.draw(My_voice.java:103)
at processing.core.PApplet.handleDraw(PApplet.java:2128)
at processing.core.PGraphicsJava2D.requestDraw(PGraphicsJava2D.java:190)
at processing.core.PApplet.run(PApplet.java:2006)
at java.lang.Thread.run(Thread.java:662)
Thanks,
I broke the code up into chunks in an attempt to make each step clear. So I guess the final code would be once you have added all the features that you like?
The arduino is only running some code that responds to serial input coming from processing. In this 'ible I am more showing how to get speech recognition running in processing and providing a few 'seed' ideas to put it to an entertaining use. Check out part 1 (link above), it might clarify things a little bit.
Do you have to train the robot to recognize your speech patterns or are the commands user independent ?
(also, did the tree say "kiss me" at 0:50 in the first video?)
(I have a habit of thanking even machines when they have done something for me..so I programmed accordingly...it is not always easy being Canadian.)