Utilities classes for the Zumo Robot

Dependents:   ZumoRobotBluetoothControlled Fsl_Zumo

This library represents some useful code for controlling your Zumo Robot.

Committer:
catalincraciun7
Date:
Sun Dec 21 12:46:41 2014 +0000
Revision:
6:7740c9d8d834
Parent:
4:dcd52a961392
Child:
7:d2af97b7cc94
Encryption removed

Who changed what in which revision?

UserRevisionLine numberNew contents of line
catalincraciun7 4:dcd52a961392 1 // Craciun Catalin
catalincraciun7 4:dcd52a961392 2 // Buzzer.h
catalincraciun7 4:dcd52a961392 3 // © 2014 Catalin Craciun
catalincraciun7 4:dcd52a961392 4
catalincraciun7 4:dcd52a961392 5 #ifndef BuzzerH
catalincraciun7 4:dcd52a961392 6 #define BuzzerH
catalincraciun7 4:dcd52a961392 7
catalincraciun7 4:dcd52a961392 8 #include "mbed.h"
catalincraciun7 4:dcd52a961392 9
catalincraciun7 4:dcd52a961392 10 class Buzzer {
catalincraciun7 4:dcd52a961392 11 public:
catalincraciun7 4:dcd52a961392 12 // Public methods and properties
catalincraciun7 4:dcd52a961392 13 Buzzer(PinName buzzerPinName);
catalincraciun7 4:dcd52a961392 14 ~Buzzer();
catalincraciun7 4:dcd52a961392 15 void stopBeep();
catalincraciun7 4:dcd52a961392 16 void startBeep(float frequency, float duration);
catalincraciun7 6:7740c9d8d834 17 void playDefaultMelody();
catalincraciun7 4:dcd52a961392 18 private:
catalincraciun7 6:7740c9d8d834 19 // Private methods and properties
catalincraciun7 6:7740c9d8d834 20 void playMel();
catalincraciun7 4:dcd52a961392 21 PwmOut buzzerPin;
catalincraciun7 4:dcd52a961392 22 Timeout timeout;
catalincraciun7 4:dcd52a961392 23 };
catalincraciun7 4:dcd52a961392 24
catalincraciun7 4:dcd52a961392 25 #endif // BuzzerH