Question and code from ir distance sensor

I am newbie with this ir distance sensor sharp.
is the IR distance sensor can detect the led
how it work on the circuit and code?

It would help if you could start by telling us what sensor you’re talking about. Following that, letting us know what you’ve done/tried so far wouldn’t be a bad thing either.

I am working on fade in and out of led strips with warmwhite, so the led strips are 12v and this ir distance sensor sharp is 5v

is that any suggestion that sensor types can work with led strips warm white 12v? how it work and code?

You’re obviously missing power in the last image, with the rails not being connected.
If you hook it up properly, you could try this code:

int sensorpin = 0;                 // analog pin used to connect the sharp sensor
int val = 0;                 // variable to store the values from sensor(initially zero)

void setup()
  Serial.begin(9600);               // starts the serial monitor
void loop()
  val = analogRead(sensorpin);       // reads the value of the sharp sensor
  Serial.println(val);            // prints the value of the sensor to the serial monitor
  delay(100);                    // wait for this much time before printing next value

it’s work on the read from different distance near and far.
How to make the output which is detect motion from people ?

I’m not sure I understand the question. This sensor can’t do anything other than detecting distance. There’s no magic code to have it distinguish between human and non-human distance.

What are you trying to do with it?

Oh, i got it that. I was wondering this sensor wont work in human distance but anyway thank you for you help.