AForge.Robotics.Lego.RCXBrick.PlayTone C# (CSharp) Method

PlayTone() public method

Play tone of specified frequency.
public PlayTone ( short frequency, byte duration ) : bool
frequency short Tone frequency in Hz.
duration byte Tone duration in 1/100ths of a second.
return bool
        public bool PlayTone( short frequency, byte duration )
        {
            return SendCommand( new byte[] { (byte) RCXCommand.PlayTone,
                (byte) ( frequency & 0xFF ),
                (byte) ( frequency >> 16 ),
                duration },
                new byte[1], 1 ); ;
        }