|
upm
0.2.0
Sensor/Actuator repository for libmraa (v0.6.1)
|
C++ API for the GroveSpeaker speaker. More...
UPM module for the GroveSpeaker. This sensor can generate different tones and sounds depending on the frequency of the input signal.
Public Member Functions | |
| GroveSpeaker (int pin) | |
| ~GroveSpeaker () | |
| void | playAll () |
| void | playSound (char letter, bool sharp, std::string vocalWeight) |
| GroveSpeaker | ( | int | pin | ) |
GroveSpeaker Constructor
| pin | digital pin to use |
| ~GroveSpeaker | ( | ) |
GroveSpeaker Destructor
| void playAll | ( | ) |
Play all alto notes (lowest notes)

| void playSound | ( | char | letter, |
| bool | sharp, | ||
| std::string | vocalWeight | ||
| ) |
Play a sound and note whether it's sharp or not
| letter | character name of note ('a', 'b', 'c', 'd', 'e', 'f', or 'g') |
| sharp | if true, play sharp version of note; otherwise, do not |
| vocalWeight | string to determine whether to play low ("low"), medium ("med"), or high ("high") note |

1.8.9.1