ARDUINO Drum pad + SD (without midi port)

Hello my friends!.. I want to raise my child Drum Pads, he really wants it… I found a ready skech, but i did not get to fill in the “Arduino Uno” … when I fill in the sketch, the program writes an “errors”…
help understand where the error can be!..
in advance thank you very much!..

//líbrerias necesarias
#include <SD.h>  
#include <SPI.h>
#include <TMRpcm.h>  
#include <CapacitiveSensor.h>

#define pinSD 10     //define el pin para seleccionar la tarjeta SD

TMRpcm tmrpcm;   //Se crea un objeto de la librería TMRpcm

CapacitiveSensor   cs_14_2 = CapacitiveSensor(14,2); // define pines en arduino uno el 14 es A0.
CapacitiveSensor   cs_14_3 = CapacitiveSensor(14,3);
CapacitiveSensor   cs_14_4 = CapacitiveSensor(14,4);
CapacitiveSensor   cs_14_5 = CapacitiveSensor(14,5);
CapacitiveSensor   cs_14_6 = CapacitiveSensor(14,6);
CapacitiveSensor   cs_14_7 = CapacitiveSensor(14,7);
CapacitiveSensor   cs_14_8 = CapacitiveSensor(14,8);

int sense = 400;  // define sencibilidad a menor numero mas sencible
int tiempo = 100; // define tiempo maximo de reproduccion


void setup(){
  tmrpcm.speakerPin = 9; // define el pin en el que está conectada la bocina
  Serial.begin(9600);    

  if (!SD.begin(pinSD)) {  // verifica la coneccion de la tarjeta sd:
    Serial.println("Fallo en la tarjeta SD");  //Aviso de que algo no anda bien 
    return;   //No hacer nada si no se pudo leer la tarjeta
  }
}

void loop(){  
  
   long valor1 =  cs_14_2.capacitiveSensor(20);
 
 if (valor1 > sense){
      Serial.println("pad1");  //Imprime pad detectado
     
      tmrpcm.play("hhat.wav");  // nombre de archivo a reproducir guardado en la sd.
      delay(tiempo);} 
             ////////////////FFFFFFFFFFFFFFFFFFF//////////////////////////
  long valor2 =  cs_14_3.capacitiveSensor(20);
 
 if (valor2 > sense){
      Serial.println("pad2");  
     
     
    tmrpcm.play("plati1.wav");    
      delay(tiempo);} 
             ////////////////FFFFFFFFFFFFFFFFFFF//////////////////////////
  long valor3 =  cs_14_4.capacitiveSensor(20);
 
 if (valor3 > sense){
      Serial.println("pad3"); 
      tmrpcm.play("plati2.wav");    
      delay(100);} 
             ////////////////FFFFFFFFFFFFFFFFFFF//////////////////////////
  long valor4 =  cs_14_5.capacitiveSensor(20);
 
 if (valor4 > sense){
      Serial.println("pad4");  
     tmrpcm.play("tambor1.wav");    
      delay(100);} 
             ////////////////FFFFFFFFFFFFFFFFFFF//////////////////////////
  long valor5 =  cs_14_6.capacitiveSensor(20);
 
 if (valor5 > sense){
      Serial.println("pad5"); 
     tmrpcm.play("tambor2.wav");    
      delay(100);} 
             ////////////////FFFFFFFFFFFFFFFFFFF//////////////////////////
  long valor6 =  cs_14_7.capacitiveSensor(20);
 
 if (valor6 > sense){
      Serial.println("pad6"); 
     tmrpcm.play("go.wav");    
      delay(100);}
             ////////////////FFFFFFFFFFFFFFFFFFF//////////////////////////
  long valor7 =  cs_14_8.capacitiveSensor(20);
 
 if (valor7 > sense){
      Serial.println("pad7");  
      tmrpcm.play("bombo1.wav");    
      delay(100);} 
             ////////////////FFFFFFFFFFFFFFFFFFF//////////////////////////

the program writes an "errors"...

No, it does not. The compiler might generate errors, but YOU need to tell US what they are.

Put EVERY } on a line BY ITSELF.
Put EVERY { on a line BY ITSELF.

Use Tools + Auto Format to properly indent your code. Right now, it looks like it was typed by a drunken monkey.

What errors does the compiler report ?

Have you installed all of the libraries used by the program ?

Sorry, it seems like your code has some errors preventing us from running the code.

" 26:17: fatal error: SPI.h: No such file or directory "

PaulS:
No, it does not. The compiler might generate errors, but YOU need to tell US what they are.

Put EVERY } on a line BY ITSELF.
Put EVERY { on a line BY ITSELF.

Use Tools + Auto Format to properly indent your code. Right now, it looks like it was typed by a drunken monkey.

do you see?! )))

irakli-kv:
do you see?! )))

See what?

What app are you running, there?

Try compiling your code using the real IDE.

PaulS:
See what?

What app are you running, there?

Try compiling your code using the real IDE.

C:\Users\ika\Desktop\DRUm arduino\bateria_electronica3\bateria_electronica3.ino:8:22: fatal error: TMRpcm.h: No such file or directory

#include <TMRpcm.h>

^

compilation terminated.

exit status 1
??? ??? ??? ??? Arduino/Genuino Uno

C:\Users\ika\Desktop\DRUm arduino\bateria_electronica3\bateria_electronica3.ino:8:22: fatal error: TMRpcm.h: No such file or directory

#include <TMRpcm.h>

^

compilation terminated.

exit status 1
??? ??? ??? ??? Arduino/Genuino

Is there some part of that message that you don't understand? You have failed to download and/or properly install a needed library.

thank, all ok :):):slight_smile: