| Description | View Program
In this code, sound frequencies are played corresponding to changing
light values. Light sensor readings, which fall between 0-100, are
placed in a variable and multiplied by the constant 8. The value
of that variable, which now falls between 0-800, becomes the frequency
in Hz of the sound played. The frequency is also displayed on the NXT. |