Add a sensor that detects a player when nearby and release redstone pulse or persistent signal.
recipers for the block type and attached type sensor, middle can be change to lever or stone button
this is a full block type of sensor
model is same like a ladder, attaching to a block
Detects when a player is nearby and sends a persistent signal, it will only turn off when the player leaves the detection range
Sends a redstone signal when a player is nearby