Bonjour,
Je cherche de l'aide pour le protocole TTL. Je ne comprends pas très bien comment je dois envoyer le data!???
Voici ce qui est écrit dans le manuel (voir plus bas), mais je ne saisis pas bien la logique??
Merci de votres aide
Serial Control Protocol
The MP3 Trigger v2 comes with a full duplex 3.3-5V serial TTL interface that allows for control of all the MP3 tracks
(up to 256) on the microSD card as well as volume, and for monitoring input trigger activity. You can use our FTDI
Basic (DEV-09115) or connect to any serial interface that uses the format: 8-bits, 1-start, 1-stop, no parity, flow
control = none. The serial port baud rate defaults to 38.4kbps, but can be changed using the initialization file. All
commands to the MP3 Trigger v2 are 1 or 2 bytes in length.
1-byte commands are upper case ASCII characters.
2-byte commands start with an ASCII character. Those starting with an upper case character use an ASCII value (‘0’
– ‘9’) as the second byte. (These commands can be typed on a keyboard.) 2-byte commands starting with a lower
case character require a binary value (0 – 255) as the second byte.
Bytes sent to the MP3 Trigger v2 are not echoed. If echoing is required, set your terminal program to echo locally.
Command Summary
Command: Navigation – Start/Stop
Number of bytes: 1
Command byte: ‘O’
Data byte: none
Comments: This command performs the same function as pushing the on-board nav switch center position. If the
current track is playing, it stops. If the current track is stopped, it will restart from the beginning
Command: Navigation – Forward
Number of bytes: 1
Command byte: ‘F’
Data byte: none
Comments: This command performs the same function as pushing the on-board nav switch right position. The next
MP3 track in the directory will be started.
Command: Navigation – Reverse
Number of bytes: 1
Command byte: ‘R’
Data byte: none
Comments: This command performs the same function as pushing the on-board nav switch left position. The
previous MP3 track in the directory will be started.
Command: Trigger (ASCII)
Number of bytes: 2
Command byte: ‘T’
Data byte: N = ASCII ‘1’ through ‘9’
Comments: If it exists, the track with the filename “00Nxxxx.MP3” will be started, where N is the data byte. xxxx can
be any valid filename characters of any length.
Command: Trigger (binary)
Number of bytes: 2
Command byte: ‘t’
Data byte: n = 1 to 255
Comments: If it exists, the track with the filename “NNNxxxx.MP3” will be started, where NNN is the ASCII equivalent
of the data byte n with leading 0s. xxxx can be any valid filename characters of any length.
Command: Play (binary)
Number of bytes: 2
Command byte: ‘p’
Data byte: n = 0 to 255
Comments: If it exists, the nth track in the directory will be played. The total number of available tracks in the
directory can be retrieved using Status Request command below.
Command: Set Volume (binary)
Number of bytes: 2
Command byte: ‘v’
Data byte: n = 0 to 255
Comments: The VS1053 volume will be set to the value n. Per the VS1053 datasheet, maximum volume is 0x00, and
values much above 0x40 are too low to be audible.
Command: Status Request (ASCII)
Number of bytes: 2
Command byte: ‘S’
Data byte: N = ASCII ‘0’ through ‘1’
Comments: If N = ‘0’, the MP3 Trigger will respond with a version string. If N = ‘1’, the MP3 Trigger v2 will respond
with the total number of tracks on the installed microSD card, in ASCII. Both responses will be preceded by the ‘=’
character.
Command: Quiet Mode (ASCII)
Number of bytes: 2
Command byte: ‘Q’
Data byte: N = ASCII ‘0’ or ‘1’
Comments: If N=’1’, Quiet mode is turned on. If N=’0’, Quiet mode is turned off. Default state is off.