beeper
¶
Beeper utilities.
Make sure to connect the jumpers for J4 on the board!
Classes:
| Name | Description |
|---|---|
Beeper |
Beeper. |
Functions:
| Name | Description |
|---|---|
test_beeper |
Test for the beeper class. |
Beeper
¶
Beeper(pin: int)
Beeper.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
pin
|
int
|
The pin the beeper is connected to. |
required |
Methods:
| Name | Description |
|---|---|
play |
Play a tone. |
Source code in src/aalec/beeper.py
20 21 | |
play
¶
Play a tone.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
freq
|
int
|
The frequency of the tone. If the frequency is <=0, no tone will be played. |
required |
dur
|
int | None
|
Duration of the tone in ms.
If set to |
None
|
Source code in src/aalec/beeper.py
23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 | |
test_beeper
¶
test_beeper() -> None
Test for the beeper class.
Source code in src/aalec/beeper.py
40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 | |