Xenon is a friendly dragon and loves having people around. In fact, if you look closely at the video and pictures, you can see his rider, Ben. Equipped with an Ultrasonic Sensor, Xenon will detected any bad creatures that cross his path. He will then breath fire to defend himself and his rider, and keep breathing fire every few seconds until the creature goes away. In the video, the LEGO box takes the place of the bad guy. I used an old Bionicle piece for the fire and attached it so that when the motor moves and the mouth opens, the fire moves up and out a little. The forth picture shows how Xenon also raises his tail when he breaths fire.
As shown in the in the picture, I used five gears on each side (ten gears total) and one motor to power the legs. I originally had two motors for the legs, but when I realized that it would still be able to walk with one motor, I removed the other one. Weighing almost exactly three pounds (1.4 kilograms), Xenon is the largest NXT creation I've ever made. He is about 1 foot tall (0.3 meters), 1 foot long (0.3 meters), and has a wingspan of about 14.5 inches (0.36 meters).
The programming is pretty simple. It consists of a few blocks inside a Switch Block inside a loop. The NXT will keep walking forward and moving it's tail (programming displayed in first picture) until the Ultrasonic Sensor detects something that is 10 inches away, then all the motors will stop, Xenon will wait a second, open his mouth and lift his tail, wait another second, and close his mouth and lower his tail (programming displayed in the second picture). Thanks to the loop, the Switch Block will start over and either start walking again if the object has left, or repeat the second process if it is still there.