Skip to content

Sounds

There are two sound devices supported.

These have very different electronic characteristics but are operated by the same set of commands and EXRAIL functions designed for simple sound control. Refer to the relevant page for device specific details.

Sound Commands

The command is specifically designed for easy testing and control of sounds from the serial monitor. Every command is directed towards the previously defined vpin.

  • <y vpin PLAY track [volume]> Plays given track number and specified (or default) volume
  • <y vpin REPEAT track [volume]> Plays track repeatedly
  • <y vpin PAUSE > Pauses playing
  • <y vpin RESUME> Resumes playing
  • <y vpin STOP> Stops playing
  • <y vpin FOLDER folder> Switches future play commands to a different folder
  • <y vpin VOL volume> Changes default play volume (Does not affect currently playing track)
  • <y vpin EQ eq> Changes sound equalisation
  • <y vpin RESET> Resets the DFPlayer

Sound in EXRAIL

Refer to the EXRAIL cookbooks for examples.