RoverBuzzer class provides the member functions related to embedded buzzer on the rover.
More...
#include <rover_buzzer.hpp>
|
static const int | INPUT_ = 0 |
| Static definition for INPUT pin mode for wPiPinMode function. More...
|
|
static const int | OUTPUT_ = 1 |
| Static definition for OUTPUT pin mode for wPiPinMode function. More...
|
|
static const int | PWM_OUTPUT_ = 2 |
| Static definition for PWM_OUTPUT pin mode for wPiPinMode function. More...
|
|
static const int | GPIO_CLOCK_ = 3 |
| Static definition for GPIO_CLOCK pin mode for wPiPinMode function. More...
|
|
static const int | SOFT_PWM_OUTPUT_ = 4 |
| Static definition for SOFT_PWM_OUTPUT pin mode for wPiPinMode function. More...
|
|
static const int | SOFT_TONE_OUTPUT_ = 5 |
| Static definition for SOFT_TONE_OUTPUT pin mode for wPiPinMode function. More...
|
|
static const int | PWM_TONE_OUTPUT_ = 6 |
| Static definition for PWM_TONE_OUTPUT pin mode for wPiPinMode function. More...
|
|
static const int | LO = 0 |
| Static definition for digital voltage level : LOW. More...
|
|
static const int | HI = 1 |
| Static definition for digital voltage level : HIGH. More...
|
|
RoverBuzzer class provides the member functions related to embedded buzzer on the rover.
rover::RoverBuzzer::RoverBuzzer |
( |
| ) |
|
int rover::RoverBuzzer::getBuzzerFrequency |
( |
void |
| ) |
|
Retrieves the default buzzer frequency in Hz.
- Returns
- buzzer_freq Default buzzer frequency in Hz.
void rover::RoverBuzzer::initialize |
( |
void |
| ) |
|
Initializes the RoverBuzzer that is instantiated.
- Returns
- void
void rover::RoverBuzzer::setBuzzerFrequency |
( |
const int |
buzzer_freq | ) |
|
Sets the default buzzer frequency in Hz. Values between 0-1000 Hz are conventionally used for the buzzer frequency.
- Parameters
-
buzzer_freq | Buzzer frequency to be set in Hz |
- Returns
- void
void rover::RoverBuzzer::setBuzzerOff |
( |
void |
| ) |
|
Turns off the buzzer.
- Returns
- void
void rover::RoverBuzzer::setBuzzerOn |
( |
void |
| ) |
|
Plays the buzzer with the default frequency.
- Returns
- void
void rover::RoverBuzzer::setBuzzerPin |
( |
const int |
pin | ) |
|
Overrides the default buzzer pin in wiringPi format.
- Parameters
-
- Returns
- void
void rover::RoverBuzzer::setBuzzerTone |
( |
const int |
buzzer_freq | ) |
|
Plays the buzzer with custom buzzer frequency.
- Parameters
-
buzzer_freq | Buzzer frequency to be set in Hz |
- Returns
- void
void rover::RoverBuzzer::shutdownTone |
( |
void |
| ) |
|
Plays the shutdown tone.
- Returns
- void
int rover::RoverBuzzer::BUZZER_FREQUENCY |
|
private |
Default buzzer frequency used by setBuzzerOn function.
int rover::RoverBuzzer::BUZZER_PIN |
|
private |
Buzzer pin in wiringPi format.
const int rover::RoverBuzzer::DEFAULT_BUZZER_PIN = 28 |
|
staticprivate |
Embedded buzzer pin on rover in wiringPi format.
int rover::RoverBuzzer::ROVERBUZZER_INIT_ |
|
private |
The documentation for this class was generated from the following files: