Advertisement
Guest User

Untitled

a guest
Sep 25th, 2018
66
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.99 KB | None | 0 0
  1. /*
  2. Example: Control a WTV020-SD-16P module to play voices from an Arduino board.
  3. Created by ELECTRONOOBS, oct 14, 2016.
  4. */
  5.  
  6. #include <Wtv020sd16p.h>
  7.  
  8. int resetPin = 4; // The pin number of the reset pin.
  9. int clockPin = 5; // The pin number of the clock pin.
  10. int dataPin = 6; // The pin number of the data pin.
  11. int busyPin = 7; // The pin number of the busy pin.
  12.  
  13. /*
  14. Create an instance of the Wtv020sd16p class.
  15. 1st parameter: Reset pin number.
  16. 2nd parameter: Clock pin number.
  17. 3rd parameter: Data pin number.
  18. 4th parameter: Busy pin number.
  19. */
  20. Wtv020sd16p wtv020sd16p(resetPin,clockPin,dataPin,busyPin);
  21.  
  22. void setup() {
  23. //Initializes the module.
  24. wtv020sd16p.reset();
  25. }
  26.  
  27. void loop() {
  28. ///////////////////////////////////////////
  29. //This are all the functions for the WTV020 module
  30. //Use yours and delete the others
  31. //Each function is explained
  32. ///////////////////////////////////////////
  33.  
  34. //Plays synchronously an audio file. Busy pin is used for this method.
  35. wtv020sd16p.playVoice(0);
  36.  
  37. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement