Home Page | Language Reference (extended) | SD Reference | Libraries | Comparison | Changes


Robot

beginSpeaker()

Description

Initializes the speaker and sound libraries. Must be included in setup().

Syntax

Robot.beginSpeaker()

Parameters

none

Returns

none

Examples

#include <ArduinoRobot.h> void setup ( ) {
  Robot.begin ( ) ;
  Robot.beginSpeaker ( ) ; //Initialize the sound module
} void loop ( ) {
  char aTinyMelody[ ] = "8eF-FFga4b.a.g.F.8beee-d2e.1-" ; // This is what we will play
  Robot.playMelody (aTinyMelody) ; // Play the melody }

See also


Reference Home

Corrections, suggestions, and new documentation should be posted to the Forum.

The text of the Arduino reference is licensed under a Creative Commons Attribution-ShareAlike 3.0 License. Code samples in the reference are released into the public domain.