
I’ve had a lot of fun with Spike throughout the year and thought it would be neat to give Spike the ability to not only respond to loud noises, but also move (and if necessary, turn) towards the loudest noise.
I’m pretty fond of using pairs of sensors to give robots more sophisticated behaviour. For example, a soccer robot with two light sensors can keep track of where a ball is (and to which side it has been lost) much more effectively than a soccer robot with one light sensor.
The Roman philosopher Epictetus is usually credited for the saying, 'we have two ears and one mouth so that we can listen twice as much as we speak.' Maybe in the case of a Spike with two sound sensors this should be, 'we have two sound sensors and one stinger so that we can listen twice as much as we strike!'
I started writing a program for Binaural Spike using a subsumption architecture idea in NXT-G, but found working with nested loops and switches (and global variables to pass data between MyBlocks!) much too frustrating. I gave up and switched to RobotC – and found it much easier…Admittedly, the program is far more complicated than it needs to be, and doesn’t quite work 100% of the time. (By comparison, with a just a little help, my 5-year old son made a pretty decent program for Binaural Spike using NXT-G in about 10 minutes that works fine.)
One of the biggest problems I had was with the sensitivity of the sound sensors. If the threshold is set too low, then Spike ends up responding to the sound of his own motors. If the threshold is too high, then both sound sensors respond to the noise and Spike goes forward rather than turning. One part of the solution must be to shield the sound sensors more effectively, so I’d love to hear from anyone who has a clever way of doing this.Rob
PS: If you’re expecting to program Spike using the USB cable, I’ve found that it’s a lot easier to get to the USB port if you reverse the direction of the NXT compared to the direction indicated in LEGO’s building plans.