|
LCC Fusion Project 1.0
LCC Automation
|
#include <SoundPlayerDevice.h>

Public Member Functions | |
| void | begin () |
| Invoke to begin the connection to a local player device using software Serial UART. Initialize the DFPlayer device and restore previously saved settings (from SPIFFs file) for the DFPLayer device. More... | |
| bool | begin (uint8_t i2cBusNum, uint8_t i2cSlaveAddressOffset) |
| Invoke to begin the connection to a remote player device using Serial I2C. More... | |
| void | play (uint8_t fileNum, uint8_t volume) |
| sends the 'play' command (play mp3 file once) to either a local or remote player device. More... | |
| void | loop (uint8_t fileNum, uint8_t volume) |
| sends the 'loop' command (play mp3 file continously) to either a local or remote player device. More... | |
| void | pause () |
| sends the 'pause' command (play mp3 file once) to either a local or remote player device. The player will be paused until either a 'play' or 'loop' request is received. More... | |
| void | reset () |
| clears the players settings. Note that after each play/loop/pause request, the player's settings are saved in a SPIFFs file. Saved settings are restored later after a player powered on. Clearing the settings causes the player to not play (until a play or loop request is received). More... | |
| playerNum | is the number of the player (1-nn) the object is being created for. |
Definition at line 58 of file SoundPlayerDevice.h.
|
inline |
Invoke to begin the connection to a local player device using software Serial UART. Initialize the DFPlayer device and restore previously saved settings (from SPIFFs file) for the DFPLayer device.
Definition at line 88 of file SoundPlayerDevice.h.
|
inline |
Invoke to begin the connection to a remote player device using Serial I2C.
| i2cBusNum | is the I2C bus to be used for the connection (0 or 1). |
| i2cSlaveAddressOffset | is the I2C slave address offset to be added to the base address. The offset is configured by the administrator in the CDI to match the offset configured on the an I2C enabled card (address offset switch settings). |
Definition at line 113 of file SoundPlayerDevice.h.

|
inline |
sends the 'loop' command (play mp3 file continously) to either a local or remote player device.
| fileNum | is the file number to be played. For DFPlayer, this is the position in a sorted list of files in the root directory of the SD card, each name '0000n.mp3'. |
| volume | is the % of volume to be played (0-100). |
Definition at line 153 of file SoundPlayerDevice.h.


|
inline |
sends the 'pause' command (play mp3 file once) to either a local or remote player device.
The player will be paused until either a 'play' or 'loop' request is received.
Definition at line 175 of file SoundPlayerDevice.h.


|
inline |
sends the 'play' command (play mp3 file once) to either a local or remote player device.
| fileNum | is the file number to be played. For DFPlayer, this is the position in a sorted list of files in the root directory of the SD card, each name '0000n.mp3'. |
| volume | is the % of volume to be played (0-100). |
Definition at line 127 of file SoundPlayerDevice.h.


|
inline |
clears the players settings. Note that after each play/loop/pause request, the player's settings are saved in a SPIFFs file. Saved settings are restored later after a player powered on. Clearing the settings causes the player to not play (until a play or loop request is received).
Definition at line 211 of file SoundPlayerDevice.h.

