Driver for Me Buzzer module.
More...
#include <src/MeBuzzer.h>
Driver for Me Buzzer module.
Class: MeBuzzer
- Description
- Declaration of Class MeBuzzer.
- Copyright (C), 2012-2016, MakeBlock
◆ MeBuzzer() [1/3]
Alternate Constructor which can call your own function to map the buzzer to arduino port, no pins are used or initialized here.
- Parameters
-
Alternate Constructor which can call your own function to map the Buzzer to arduino port, Buzzer pins are used and initialized here.
- Parameters
-
◆ MeBuzzer() [2/3]
| MeBuzzer::MeBuzzer |
( |
uint8_t |
port | ) |
|
Alternate Constructor which can call your own function to map the Buzzer to arduino port, If the hardware serial was selected, we will used the hardware serial.
- Parameters
-
| [in] | port | - RJ25 port from PORT_1 to M2 |
◆ MeBuzzer() [3/3]
| MeBuzzer::MeBuzzer |
( |
uint8_t |
port, |
|
|
uint8_t |
slot |
|
) |
| |
Alternate Constructor which can call your own function to map the Buzzer to arduino port, you can set any slot for the buzzer device.
- Parameters
-
| [in] | port | - RJ25 port from PORT_1 to M2 |
| [in] | slot | - SLOT1 or SLOT2 |
◆ noTone() [1/2]
| void MeBuzzer::noTone |
( |
| ) |
|
- Function
- noTone
- Description
- Do not playing the tones.
- Parameters
-
- Output
- None \Return None.
- Others
- None
◆ noTone() [2/2]
| void MeBuzzer::noTone |
( |
int |
pin | ) |
|
- Function
- noTone
- Description
- Do not playing the tones.
- Parameters
-
| [in] | pin | - Which pin on board that buzzer is connecting to. |
- Output
- None \Return None.
- Others
- None
◆ setpin()
| void MeBuzzer::setpin |
( |
int |
pin | ) |
|
- Function
- setpin
- Description
- Reset the buzzer available pin by its arduino port.
- Parameters
-
| [in] | pin | - arduino port for buzzer detect pin. |
- Output
- None
- Return
- None
- Others
- None
◆ tone() [1/2]
| void MeBuzzer::tone |
( |
int |
pin, |
|
|
uint16_t |
frequency, |
|
|
uint32_t |
duration |
|
) |
| |
- Function
- tone
- Description
- Playing the tones.
- Parameters
-
| [in] | pin | - Which pin on board that buzzer is connecting to. |
| [in] | frequency | - The speed of buzzer's tone play. |
| [in] | duration | - Time of a tone play. |
- Output
- None \Return None.
- Others
- Frequency (in hertz) and duration (in milliseconds).
◆ tone() [2/2]
| void MeBuzzer::tone |
( |
uint16_t |
frequency, |
|
|
uint32_t |
duration = 0 |
|
) |
| |
- Function
- tone
- Description
- Playing the tones.
- Parameters
-
| [in] | frequency | - The speed of buzzer's tone play. |
| [in] | duration | - Time of a tone play. |
- Output
- None \Return None.
- Others
- Frequency (in hertz) and duration (in milliseconds).
The documentation for this class was generated from the following files: