Proximity sensor without proximity sensor; is my hand magic, my competency crap, or my arduino fried? here is a very simple circuit, with a LED between pin 2 and ground, and a loose wire in pin 8.



Here is the sketch that was intended for use with a small 4-contact switch like these in every arduino starter kit :

int yellowCIn = 8;
int yellowCOut = 2;

void setup() {
  pinMode(yellowCIn, INPUT);
  pinMode(yellowCOut, OUTPUT);
}

void loop() {
  if (digitalRead(yellowCIn) == HIGH) {
  digitalWrite(yellowCOut, HIGH);
  }
  else {
    digitalWrite(yellowCOut, LOW);
  }
}


However, simply moving my hand near the loose white wire is enough to light the LED, moving it away to put it off. As I am writing this, with the arduino connected by usb, rather than on the blue battery visible in the picture, I notice moving my hands away from the keyboard lights the led, moving them close to the keyboard powers it off...

So back to my title : are my hands magic, my electronics competency crap (well, it is, for sure) enough that I never heard of such a tremendous static electricity effect (and never fried one of the many computers I built from parts), or does this board have dire problems?

Thanks for your attention :)
Nothing's broken; you have discovered  the nature of a floating pin.  Unfortunately, that means that strange things happen...

A very small charge from your hand is triggering the logic because the state of the pin (high or low) is not set.  To fix this, you need to add a pull-up or pull-down resistor (or activate the internal input-pullup resistor).

You can read about how to accomplish this here.