SPIKE-RT C API Reference [English]
An RTOS-based software platform for LEGO® Education SPIKE™.
|
APIs for speaker. More...
Functions | |
void | hub_speaker_set_volume (uint8_t volume) |
Set the volume level of speaker. More... | |
void | hub_speaker_play_tone (uint16_t frequency, int32_t duration) |
Play a tone. More... | |
void | hub_speaker_stop (void) |
Stop the sound. | |
APIs for speaker.
void hub_speaker_play_tone | ( | uint16_t | frequency, |
int32_t | duration | ||
) |
Play a tone.
frequency | frequency of the note in Hz. |
duraton | duration to play in msec or SOUND_MANUAL_STOP, which requires a call to hub_speaker_stop to stop the tone. |
void hub_speaker_set_volume | ( | uint8_t | volume | ) |
Set the volume level of speaker.
volume | the percentage of max volume level, between 0 and 100. |