Aws_Alkarmi
Published © GPL3+

The Plants Music Sound responding to hand touches

How to get Music out from Plants and trees. hear the music differently from every different Plant, tree. and make them response to touches.

AdvancedWork in progress7,904
The Plants Music Sound responding to hand touches

Things used in this project

Hardware components

Arduino UNO
Arduino UNO
×1
Jumper wires (generic)
Jumper wires (generic)
×1
Speaker: 0.25W, 8 ohms
Speaker: 0.25W, 8 ohms
×1
General Purpose Transistor NPN
General Purpose Transistor NPN
×1
Resistor 10k ohm
Resistor 10k ohm
×2
Resistor 1k ohm
Resistor 1k ohm
×2
Resistor 330 ohm
Resistor 330 ohm
×2

Story

Read more

Schematics

Plants Sound Circuit Diagram No.1 By Aws Alkarmi

The Circuit Diagram as requested to apply the research for more understanding

Plants Sound Circuit Diagram No.2 By Aws Alkarmi

The Circuit Diagram as requested to apply the research for more understanding.

Code

Plants Sound Music By Aws Alkarmi

Arduino
#include <CapacitiveSensor.h>
int Value=0;
int piezo=9;
int frq=0;
long D[10];                                                                                           //BY AWS ALKARMI
long F=0; 
////////////////////////BY AWS ALKARMI/////////////////////////BY AWS ALKARMI////////////////////////////THE PLANTS SOUND////////////////BY AWS ALKARMI/////////////////BY AWS ALKARMI////////
                                  ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
                  //////////////////////////////////////////////////////////////////// the white wire to pin 2 ... the blue wire to pin 4//////////////////////////////////////////////////////////
                  /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
                      ///////////////////////////////////////////////////////////////////the pins for audio output pin 9 and pin GND //////////////////////////////////////////////////////////////////

CapacitiveSensor   cs_4_2 = CapacitiveSensor(4,2);        // resistor between pins 4 & 2, pin 2 is sensor pin
       // resistor between pins 4 & 8, pin 8 is sensor pin, add a wire and or foil
int x=0;
void setup()                    
{
  pinMode(piezo,OUTPUT);
   cs_4_2.set_CS_AutocaL_Millis(0xFFFFFFFF);     // turn off autocalibrate on channel 1 - just as an example
   Serial.begin(9600);
    digitalWrite(LED_BUILTIN,LOW);
}




    
 




    


void loop()               {  
    long start = millis();
   
    
      
      
      
    
    long Value =  cs_4_2.capacitiveSensor(30);
  
                 // tab character for debug windown spacing

                    // print sensor output 1
                // print sensor output 3
     
    delay(200);   
    
    
 
     
    
    if (Value>4000&&Value<30000){                          //the device attached to the plant
     
      
      
    }
      if (Value>40000){ 
        x=0;
        
                                             // a touch has occured
      
     
       
      } 
       Serial.println(Value);
      
          
          frq=Value/200;
            tone(piezo,frq);
        
     
        
      
      }

Credits

Aws_Alkarmi
5 projects • 3 followers
Contact

Comments

Please log in or sign up to comment.