RCX Programming


Sound Lesson 2

In this lesson we will use a simple sound library RobotMusic.h and the RCX with a speaker connected to output port B to make melodic sounds.

A program that shows simple use of the sound library is Lesson2A.c. The timbre of the notes of the theme is changed in various ways. This is accomplished by varying the waveform by means of the different routines in the sound library. Try to explain what happends in the last variation of the theme.

A program with a choice of four simple melodic themes is Lesson2B.c. The Prgm button is used to make the choice between the four themes. Try to make the four themes play together.


Access to the other include and source files.