Basic proximity sensing is working with Arduino sketch.
The value goes small(because it’s like a distance) as user approach to sensor.
Move to processing
Combine with potentiometer
In a serial monitor window above, you can see the numerical value changing based on things around it.
5v- Gnd -Analog 1