Advertisement
RuiViana

Untitled

Jan 20th, 2016
269
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.53 KB | None | 0 0
  1. #include <Wtv020sd16p.h>
  2. // Conecxão do pino do WTV 0220 No Arduino
  3. int resetPin = 4; //Pino Reset
  4. int clockPin = 5; //Pino clock
  5. int dataPin = 6; //Pino data (DI)
  6. int busyPin = 7; //Pino busy
  7. int flag = 0;
  8.  
  9. Wtv020sd16p wtv020sd16p(resetPin,clockPin,dataPin,busyPin);
  10.  
  11. void SaiSom()
  12. {
  13. Serial.begin(9600);
  14. wtv020sd16p.asyncPlayVoice(0);
  15. //delay(3000);
  16. }
  17.  
  18. void setup() {
  19. wtv020sd16p.reset();
  20.  
  21. }
  22.  
  23. void loop() {
  24. if (flag <1 )
  25. SaiSom();
  26. flag++;
  27. if (flag == 5)
  28. Serial.println("5 vezes");
  29. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement