123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354 |
-
-
- #include <unistd.h>
- #include <iostream>
- #include <signal.h>
- #include "buzzer.h"
-
-
- int
- main(int argc, char **argv) {
- int chord[] = { DO, RE, MI, FA, SOL, LA, SI, DO, SI };
-
-
-
- upm::Buzzer* sound = new upm::Buzzer(5);
-
- std::cout << sound->name() << std::endl;
-
-
- for (int chord_ind = 0; chord_ind < 7; chord_ind++) {
-
- std::cout << sound->playSound(chord[chord_ind], 1000000) << std::endl;
- usleep(100000);
- }
-
-
- std::cout << "exiting application" << std::endl;
-
- delete sound;
-
- return 0;
- }
|