Ahmed Gado and David Janowsky
For our animal robot, we built an elephant (aptly named Jumbo). The robot uses two large motors, one medium motor, and the speaker for outputs, and it uses the ultrasonic sensor and the touch sensor as inputs. By default, Jumbo moves forward. When approaching an object in front of the robot, the speaker will begin to beep once it is within 70 cm. As Jumbo gets closer, the speaker will beep faster and faster until it is within 15 cm, at which point it will spin clockwise for 2.5 seconds to avoid the object. Activating the touch sensor causes Jumbo to play a song and spin in the counterclockwise direction for 3 seconds.
We used LabVIEW to program our robot. By using a while loop, our program will run indefinitely (which can be a drawback), but because our inputs control the same outputs the commands are nested inside case structures, so as not to send multiple commands to the same motor. While Jumbo is moving forward, one motor has a slightly higher power than the other in order to keep moving relatively straight. This is either due to a slight difference between the motors or an alignment issue.
We faced difficulties in reading the screen, because it was blocked by a motor, and in writing the code in LabVIEW, where the program would crash during one sequence of events, before being changed to the current version of our code.