obniz Parts Library

Grove_Speaker

GitHub
Grove_Speaker
Usable Devices :
obniz_board
m5stickc
Found at :

Grove_Speaker

Speaker can be used with Grove connectors.
Play a sound of the specified frequency.

wired(obniz, {[signal, vcc, gnd, grove]});

Connect to the obniz device.
Yellow, red and black wires correspond to signal, vcc and gnd respectively.

name type required default description
vcc number(obniz Board io) no   Power Supply
gnd number(obniz Board io) no   Power Supply
signal number(obniz Board iov) no   signal output pin
grove object no   grove interface object if a device has
// Javascript Example
const speaker = obniz.wired("Grove_Speaker", {grove: obniz.grove0})

play(frequency)

It plays a sound of the specified frequency from the speaker.

// Javascript Example
const speaker = obniz.wired("Grove_Speaker", {grove: obniz.grove0})
speaker.play(1000); //1000hz

stop()

Stop playing.

// Javascript Example
const speaker = obniz.wired("Grove_Speaker", {grove: obniz.grove0})
speaker.play(1000); //1000hz
await obniz.wait(1000);
speaker.stop();

Supported from: obniz.js 3.7.0

You will Get in Few Days

Circuit for Starter “obniz Board” is available on Amazon and other online stores.
You can get it at below

Our products and resellers

Forum

Visit our developer’s forum to discuss and discover technologies.

Forum

Contact

Feel free to contact out support and technical team.

Contact us