source: arduino-1-6-7/trunk/fuentes/arduino-ide-amd64/libraries/Robot_Control/examples/learn/Beep/Beep.ino @ 46

Last change on this file since 46 was 46, checked in by jrpelegrina, 4 years ago

First release to Xenial

File size: 604 bytes
Line 
1/*
2 Beep
3
4 Test different pre-configured beeps on
5 the robot's speaker.
6
7 Possible beeps are:
8 - BEEP_SIMPLE
9 - BEEP_DOUBLE
10 - BEEP_LONG
11
12 Circuit:
13 * Arduino Robot
14
15 created 1 May 2013
16 by X. Yang
17 modified 12 May 2013
18 by D. Cuartielles
19
20 This example is in the public domain
21 */
22
23#include <ArduinoRobot.h>
24#include <Wire.h>
25#include <SPI.h>
26
27void setup() {
28  // initialize the robot
29  Robot.begin();
30
31  // initialize the sound speaker
32  Robot.beginSpeaker();
33}
34void loop() {
35  Robot.beep(BEEP_SIMPLE);
36  delay(1000);
37  Robot.beep(BEEP_DOUBLE);
38  delay(1000);
39  Robot.beep(BEEP_LONG);
40  delay(1000);
41}
Note: See TracBrowser for help on using the repository browser.