Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <DFRobot_DF1201S.h>
- #include <SoftwareSerial.h>
- SoftwareSerial DF1201SSerial(2, 3); //RX TX
- DFRobot_DF1201S DF1201S;
- void setup(void){
- Serial.begin(115200);
- DF1201SSerial.begin(115200);
- while(!DF1201S.begin(DF1201SSerial)){
- Serial.println("Init failed, please check the wire connection!");
- delay(1000);
- }
- DF1201S.setVol(5); // Range 0 - 30
- //Serial.print("VOL:");
- //Serial.println(DF1201S.getVol());
- DF1201S.switchFunction(DF1201S.MUSIC);
- delay(2000);
- DF1201S.setPlayMode(DF1201S.SINGLE); // Sets PlayMode
- Serial.print("PlayMode:");
- Serial.println(DF1201S.getPlayMode());
- DF1201S.setPrompt(false); // Silences Voice Prompt At Startup
- }
- void loop()
- {
- DF1201S.playSpecFile("/tow/for.mp3"); //Contines
- delay(2000);
- DF1201S.playSpecFile("F/one/dos.mp3"); // Chants d'oiseaux
- delay(5000);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement