upm
1.0.2
Sensor/Actuator repository for libmraa (v1.1.1)
|
UPM module for the Speaker. This sensor can generate different tones and sounds depending on the frequency of the input signal.
Public Member Functions | |
Speaker (int pin) | |
~Speaker () | |
void | playAll () |
void | playSound (char letter, bool sharp, std::string vocalWeight) |
void playAll | ( | ) |
Plays all alto notes (lowest notes)
void playSound | ( | char | letter, |
bool | sharp, | ||
std::string | vocalWeight | ||
) |
Plays a sound and a note whether it's sharp or not
letter | Character name of the note ('a', 'b', 'c', 'd', 'e', 'f', or 'g') |
sharp | If true, plays a sharp version of the note; otherwise, does not play the note |
vocalWeight | String to determine whether to play a low ("low"), a medium ("med"), or a high ("high") note |