E2 Auto Turret

So I’ve been trying to create a completely autonomous E2 Proximity Turret, but I can’t figure out how. Can anyone help me out with this?