SMART CLEO Buzzer

main.cpp

Committer:
SMART_CLEO
Date:
2017-09-28
Revision:
0:1111e1dc9eb2

File content as of revision 0:1111e1dc9eb2:

#include "mbed.h"

PinName pin_BUZZER = PD_2;

DigitalOut Buzzer(pin_BUZZER);

int main() {

    while(1) {
        Buzzer = 1; // Buzzer On
        wait(0.5);
        Buzzer = 0; // Buzzer Off
        wait(0.5);
    }
}