pyupm_grovespeaker module

class pyupm_grovespeaker.GroveSpeaker(pin)[source]

Bases: object

API for the Grove Speaker.

Deprecated This class is being replaced by Speaker

ID: grovespeaker

Name: Speaker Module

Category: sound

Manufacturer: seeed

Connection: gpio

Kit: hak UPM module for the Grove Speaker. This sensor can generate different tones and sounds depending on the frequency of the input signal.

C++ includes: grovespeaker.hpp

playAll()[source]

void playAll()

Plays all alto notes (lowest notes)

playSound(letter, sharp, vocalWeight)[source]

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

class pyupm_grovespeaker.NoteData[source]

Bases: object

delayTimeHigh
delayTimeHighSharp
delayTimeLow
delayTimeLowSharp
delayTimeMed
delayTimeMedSharp