detection of people comming in and going out of a room (PING detector)

Hello everyone,

I'm kind of new to arduino but I'm already working on a bigger project (in my opinion ;p )

I want to detect a person comming trough a door so when the person is in the room, music will play. When the person leaves the room trough a different door (second PING detector), the music should stop.
At the moment I'm still having trouble to get the PING detectors to work. I tought they would send out an analog signal (the distance they measure) but I see people connect the signal to a digital pin.

Anyone could help me with this?
as I am a newbie around here, any help is welcome
thank you

I tought they would send out an analog signal (the distance they measure) but I see people connect the signal to a digital pin.

They send out a digital signal, apulse whose width is proportional to range.
Have you looked at the Ping example code in the Playground?

On the playground there are examples of projects that come quite close - Arduino Playground - InterfacingWithHardware -