mirror of
https://github.com/eclipse/upm.git
synced 2025-07-01 01:11:10 +03:00
Add string based constructor for Buzzer and an example to initialize it
This commit is contained in:
@ -7,6 +7,6 @@
|
||||
int
|
||||
main(int argc, char** argv)
|
||||
{
|
||||
upm::Buzzer buzzer("p:33,vol:1.0");
|
||||
upm::Buzzer buzzer("p:32,vol:0.01,play:3800:500000");
|
||||
return 0;
|
||||
}
|
||||
|
@ -35,7 +35,7 @@ main(int argc, char** argv)
|
||||
int chord[] = { BUZZER_DO, BUZZER_RE, BUZZER_MI, BUZZER_FA, BUZZER_SOL, BUZZER_LA, BUZZER_SI };
|
||||
|
||||
// create Buzzer instance
|
||||
upm::Buzzer sound(5);
|
||||
upm::Buzzer sound(32);
|
||||
// print sensor name
|
||||
std::cout << sound.name() << std::endl;
|
||||
|
||||
|
Reference in New Issue
Block a user