Simple sensor

I want use this circuit into the elevator. I want watch via Arduino where the cabin is. And I need program for watching that. It was idea what I post... no final program!