Advertisement
kartonman

player pro control by button

Sep 28th, 2021
49
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.56 KB | None | 0 0
  1. /**
  2. * @brief Test Connection
  3. */
  4. AT //Test Connection
  5.  
  6. /**
  7. * @brief Set/Query Volume(Volume:0-30)(Power-down save)
  8. * @param -n:Volume -n
  9. * +n:Volume +n
  10. * n:Designate volume to n
  11. * ?:Query volume
  12. */
  13. AT+VOL=-5 //Volume -5
  14.  
  15. AT+VOL=? //Query volume
  16. return:VOL = [10] //The current volume is 10
  17.  
  18. /**
  19. * @brief Control playback mode
  20. * @param 1:repeat one song
  21. * 2:repeat all
  22. * 3:play one song and pause
  23. * 4:Play randomly
  24. * 5:Repeat all in the folder
  25. * ?:query the current playback mode
  26. */
  27. AT+PLAYMODE=1 //Switch to repeat-one-song mode
  28.  
  29. AT+PLAYMODE=? //Query current playback mode
  30. Return:PLAYMODE =1 //Current playback mode: repeat one song
  31.  
  32. /**
  33. * @brief Control playing
  34. * @param PP:Play & Pause
  35. * NEXT:next
  36. * LAST:last
  37. */
  38. AT+PLAY=NEXT //last
  39.  
  40. /**
  41. * @brief Playing time control
  42. * @param -n:Fast Rewind n S
  43. * +n:Fast Forward n S
  44. * n:Start playing from the Nth second
  45. */
  46. AT+TIME=-5 //Fast Rewind 5S
  47.  
  48. /**
  49. * @brief Query playback information
  50. * @param 1:Query the file number of the currently-playing file
  51. * 2:Query the total number of the files
  52. * 3:Query the time length the song has played
  53. * 4:Query the total time of the currently-playing file
  54. * 5:Query the file name of the currently-playing file
  55. */
  56. AT+QUERY=1 //Query the file number of the currently-playing file
  57.  
  58. AT+QUERY=5 //Query the file name of the currently-playing file
  59. Return:test.mp3 //The currently-playing file is "test.mp3"
  60.  
  61.  
  62. /**
  63. * @brief Play the file of the specified number
  64. * @param n:File number(Play the first file if there is no such file)
  65. */
  66. AT+PLAYNUM=5 //Play file No. 5
  67.  
  68. /**
  69. * @brief Play the specific file
  70. * @param File path
  71. */
  72. AT+PLAYFILE=/DF_REC/test.MP3 //Play the test.mp3 under DF_REC once
  73.  
  74. /**
  75. * @brief Amplifier On/OFF command
  76. * @param ON, OFF
  77. */
  78. AT+AMP=ON //Turn on amplifier
  79.  
  80. /**
  81. * @brief Delete currently-playing file
  82. */
  83. AT+DEL
  84.  
  85. /**
  86. * @brief Set baud rate (power-down save, valid after re-powering on)
  87. * @param 9600、19200、38400、57600、115200
  88. */
  89. AT+BAUDRATE=115200 //Set baud rate to 115200
  90.  
  91. /**
  92. * @brief Prompt tone ON/OFF command (Power-down save)
  93. * @param ON, OFF
  94. */
  95. AT+PROMPT=ON //Turn on prompt tone
  96.  
  97. //LED Prompt On/Off Command(Power-down save)
  98. /**
  99. * @brief LED Prompt ON/OFF command (Power-down save)
  100. * @param ON, OFF
  101. */
  102. AT+LED=ON //Turn on LED Prompt
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement