Class that stores the state and functions of the soundboard object.
More...
#include <Adafruit_Soundboard.h>
Class that stores the state and functions of the soundboard object.
◆ Adafruit_Soundboard()
| Adafruit_Soundboard::Adafruit_Soundboard |
( |
Stream * |
s, |
|
|
Stream * |
d, |
|
|
int8_t |
r |
|
) |
| |
Adafruit_Soundboard constructor.
- Parameters
-
| s | Pointer to the Serial stream |
| d | Pointer to the debug port |
| r | Reset pin |
◆ reset()
| boolean Adafruit_Soundboard::reset |
( |
void |
| ) |
|
Do a hard reset by bringing the RST pin low then read out the output lines.
- Returns
- Returns the output lines
◆ readLine()
| int Adafruit_Soundboard::readLine |
( |
void |
| ) |
|
Reads a line from the stream.
- Returns
- Returns the line read
◆ listFiles()
| uint8_t Adafruit_Soundboard::listFiles |
( |
void |
| ) |
|
Query the board for the # of files and names/sizes.
- Returns
- Returns the information about the files
◆ fileName()
| char * Adafruit_Soundboard::fileName |
( |
uint8_t |
n | ) |
|
Returns the filename.
- Parameters
-
- Returns
- Returns the filename
◆ fileSize()
| uint32_t Adafruit_Soundboard::fileSize |
( |
uint8_t |
n | ) |
|
Returns the size of the file.
- Parameters
-
- Returns
- Returns the filesize
◆ volUp()
| uint8_t Adafruit_Soundboard::volUp |
( |
void |
| ) |
|
Raises the volume.
- Returns
- Returns the current volume
◆ volDown()
| uint8_t Adafruit_Soundboard::volDown |
( |
void |
| ) |
|
Lowers the volume.
- Returns
- Returns the current volume
◆ playTrack() [1/2]
| boolean Adafruit_Soundboard::playTrack |
( |
uint8_t |
n | ) |
|
Play the specified track.
- Parameters
-
- Returns
- Returns true if the track was played
◆ playTrack() [2/2]
| boolean Adafruit_Soundboard::playTrack |
( |
char * |
name | ) |
|
Play the specified track.
- Parameters
-
- Returns
- Returns true if the track was played
◆ pause()
| boolean Adafruit_Soundboard::pause |
( |
void |
| ) |
|
Pauses track.
- Returns
- Returns if pausing was successful
◆ unpause()
| boolean Adafruit_Soundboard::unpause |
( |
void |
| ) |
|
Unpauses track.
- Returns
- Returns if unpausing was successful
◆ stop()
| boolean Adafruit_Soundboard::stop |
( |
void |
| ) |
|
Stops track.
- Returns
- Returns if stopping was successful
◆ trackTime()
| boolean Adafruit_Soundboard::trackTime |
( |
uint32_t * |
current, |
|
|
uint32_t * |
total |
|
) |
| |
Returns the track time.
- Parameters
-
| current | Buffer with the current track time |
| total | Buffer with the total track time |
- Returns
- Returns the current track time
◆ trackSize()
| boolean Adafruit_Soundboard::trackSize |
( |
uint32_t * |
current, |
|
|
uint32_t * |
total |
|
) |
| |
Returns the track size.
- Parameters
-
| current | Buffer with the current track size |
| total | Buffer with the total track size |
- Returns
- Returns how many bytes are remaining over the total track size
The documentation for this class was generated from the following files: