Baby steps

Going through the beginner projects and observed something interesting. While doing the "Button" example if you leave the wire in input #2 but do not put the other end into the breadboard, the LED lights up as you wave your hand over the data wire.

Yes, I am a noob but this would be a simple way to demonstrate whatever is happening. I would like to know myself.

Thanks,

Paul

Interesting can you explain in more detail also describe your set up you might be haveing interferience

This is what I have done: http://arduino.cc/en/Tutorial/Button

If you remove the input wire that sends the signal to #2 Input from the breadboard I get this effect.

Paul

Thank you and happy Holidays.

Yes, I am a noob but this would be a simple way to demonstrate whatever is happening. I would like to know myself.

Search forum for 'floating input pin' and all will be explained.

Lefty

PaulH,

here are two of those search results:

http://www.arduino.cc/en/Tutorial/Button http://www.arduino.cc/cgi-bin/yabb2/YaBB.pl?num=1283944296

Thank you for the links.

Not knowing what a "floating point" is I had no idea what to search for.

Off to learn a little more.

Thanks again,

Paul

Not knowing what a “floating point” is I had no idea what to search for.

Please read carefully. Not floating point, that is a term for handling numbers with fractions (decimal points). Floating input pins is a hardware term talking about a specific electrical characteristics of a input pin.

Lefty

well floating pins mean that they are left not connected ! so they pick up electrical disturbances form here and there thats why they are called floating pins i.e not stable . to avois floating pins you should ground them

If you like that effect, you might also like this — the Theremin. It's doesn't operate on exactly the same principles, but the important characteristics are somewhat related.

Interesting can you explain in more detail also describe your set up you might be haveing interferience

Thank you and happy Holidays.

I can't help but think that there is a village somewhere missing its idiot.

@MakerMann - unless you can contribute or ask sensible, well-formed questions, please keep the noise posts down.

If you like that effect, you might also like this — the Theremin

How about an arduino theremin?
The capacitive sensing code was not written by me, but altered by me. (The
capacitive sensing program is interesting in its self). The origional code
was from here: http://www.arduino.cc/cgi-bin/yabb2/YaBB.pl?num=1171076259

I haven’t tried building this theremin yet, but the code is here. Even if it
doesn’t work, it could be altered for other purposes…

// Fun with capacitive sensing and some machine code - for the Arduino (or Wiring Boards).
// Note that the machine code is based on Arduino Board and will probably require some changes for Wiring Board
// This works with a high value (1-10M) resistor between an output pin and an input pin.
// When the output pin changes it changes the state of the input pin in a time constant determined by R * C
// where R is the resistor and C is the capacitance of the pin plus any capacitance present at the sensor.
// It is possible when using this setup to see some variation in capacitance when one's hand is 3 to 4 inches from the sensors
// Try experimenting with larger sensors. Lower values of R will probably yield higher reliability.
// Use 1 M resistor (or less maybe) for absolute touch to activate.
// With a 10 M resistor the sensor will start to respond 1-2 inches away

// Setup
// Connect a 10M resistor between pins 8 and 9 on the Arduino Board
// Connect a small piece of alluminum or copper foil to a short wire and also connect it to pin 9

// Machine code and Port stuff from a forum post by ARP  http://www.arduino.cc/cgi-bin/yabb2/YaBB.pl?num=1169088394/0#0

int frequency;
const int tonePin = 2;
int  i;
unsigned int x, y;
float accum, fout, fval = .07;    // these are variables for a simple low-pass (smoothing) filter - fval of 1 = no filter - .001 = max filter

void setup() {
  pinMode(ledPin, OUTPUT);
 Serial.begin(9600);
 pinMode(tonePin, OUTPUT);     // output pin
 pinMode(8, OUTPUT);     // output pin
 pinMode(9, INPUT);      // input pin
 pinMode(10, OUTPUT);    // guard pin
 digitalWrite(10, LOW);  //could also be HIGH - don't use this pin for changing output though
}

void loop() {
 y = 0;        // clear out variables
 x = 0;

 for (i=0; i < 4 ; i++ ){       // do it four times to build up an average - not really neccessary but takes out some jitter
   digitalWrite(8, HIGH);                                      
   while (digitalRead(9) != 1)               
     x++;
   }
   delay(1);
   //  HIGH-to-LOW transition
   digitalWrite(8, LOW);              
   while(digitalRead(9) != 0 ){      // same as above port manipulation - only 20 times slower!
     y++;  
   }
   delay(1);
   
 fout =  (fval * (float)x) + ((1-fval) * accum);  // Easy smoothing filter "fval" determines amount of new data in fout
 accum = fout;  
  Serial.println( (long)fout, DEC);
  frequuency = map((long)fout, 0 1000, 100, 700);   //change values for the desired frequency (output) and min/max range (input)
  tone(tonePin, frequency);
  delay(1);
  noTone(tonePin);
}

Thanks for sharing