Chapter 7 – Playing Sounds and Music
暂无分享,去创建一个
Publisher Summary
The RCX features an internal speaker and the hardware necessary to drive it, thus making a robot able to produce sounds. It offers a fun way to give robots a more defined personality, also gives a simple communication protocol that will help in testing and debugging programs. The RCX 1.5 has two very small slits on the sides with the LEGO logo stamped on it, from which the sound emanates. The sound system of the RCX is designed to be accessed from program; one is not allowed to alter the volume of the speaker, which is predefined, but have full control over the frequency (pitch) and the duration of the notes. The RCX is capable of reproducing any frequency from 31 Hertz to more than 16,000 Hertz. Sounds are the most immediate way RCX has to inform about a specific situation. The RCX is limited to playing a single note at a time, thus it is a monophonic device. There is no chance to play chords, which require two or more notes played at the same time, but one can adjust note timing to get various effects.