NXT_PlayTone
Plays a tone with the given frequency and duration
Contents
Syntax
NXT_PlayTone(frequency, duration)
NXT_PlayTone(frequency, duration, bt_handle)
Description
NXT_PlayTone(frequency, duration) plays a tone of the frequency in Hz (200 - 14000Hz) and the duration in milli seconds.
NXT_PlayTone(frequency, duration, bt_handle) sends the play tone command over the specific Bluetooth handle (serial handle (PC) / file handle (Linux)).
If no Bluetooth handle is specified the default one (BT_GetDefaultHandle) is used.
For more details see the official LEGO Mindstorms communication protocol.
Examples
NXT_PlayTone(440, 100);
bt_handle = BT_OpenHandle('bluetooth.ini','check'); BT_SetDefaultHandle(bt_handle); NXT_PlayTone(1200, 120);
See also
Signature
- Author: Linus Atorf (see AUTHORS)
- Date: 2007/10/15
- Copyright: 2007, RWTH Aachen University