Advertisement
elektronek

Mirda MP3 player

Oct 30th, 2019
316
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. #include "DFRobotDFPlayerMini.h"
  2.  
  3. DFRobotDFPlayerMini myDFPlayer;
  4.  
  5. void setup()
  6. {
  7.     Serial.begin(9600);
  8.     while (!myDFPlayer.begin(Serial)){}     // Tento radek nemam otestovanej, mel by pockat az DFplayer nabehne
  9.     myDFPlayer.volume(10);  // Nastav VOLUME od 0 do 30
  10.  
  11.     //----Vyber zarizeni pro prehravani----
  12.     myDFPlayer.outputDevice(DFPLAYER_DEVICE_SD);
  13. //  myDFPlayer.outputDevice(DFPLAYER_DEVICE_U_DISK);
  14. //  myDFPlayer.outputDevice(DFPLAYER_DEVICE_FLASH);
  15.  
  16.     //---- Vyber Equalizeru ----
  17.     myDFPlayer.EQ(DFPLAYER_EQ_NORMAL);
  18. //  myDFPlayer.EQ(DFPLAYER_EQ_POP);
  19. //  myDFPlayer.EQ(DFPLAYER_EQ_ROCK);
  20. //  myDFPlayer.EQ(DFPLAYER_EQ_JAZZ);
  21. //  myDFPlayer.EQ(DFPLAYER_EQ_CLASSIC);
  22. //  myDFPlayer.EQ(DFPLAYER_EQ_BASS);
  23.  
  24.     myDFPlayer.enableLoopAll();     // Prehravej dokola vsechny skladby - rezim
  25.     myDFPlayer.play(1);             // Prehraj prvni mp3 soubor a jed dal
  26. }
  27.  
  28. void loop()
  29. {
  30.     // Nic, vubec nic ...
  31. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement