Last change
on this file since 206 was 136, checked in by ertl-honda, 9 years ago |
ライブラリとOS及びベーシックなサンプルの追加.
|
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 |
|
---|
27 | void setup() {
|
---|
28 | // initialize the robot
|
---|
29 | Robot.begin();
|
---|
30 |
|
---|
31 | // initialize the sound speaker
|
---|
32 | Robot.beginSpeaker();
|
---|
33 | }
|
---|
34 | void 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.