Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Diff: sirena.h
- Revision:
- 0:07997c7eb70b
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/sirena.h Thu Feb 18 17:37:33 2021 +0000 @@ -0,0 +1,25 @@ +#ifndef MBED_sirena_H +#define MBED_sirena_H + +#include "mbed.h" + +namespace mbed +{ +class sirena +{ //koristi pwm za generiranje zvuka na Buzzeru +public: + +sirena (PinName pin); // povezivanje Zvuk objekta sa pinom na mikrokontroleru + +void beep (float frequency, float time); //zvučni signal sa zadanim trajanjem i frekvencijom + +void nobeep(); //ugasi Buzzer + +private : + + PwmOut _pwm; + Timeout toff; +}; + +} +#endif \ No newline at end of file