A camshaft position sensor (or any sensor ... can connect to the ECM using a DIY scan tool to try and diagnose the problem, it's best to take it to the pros when the Check Engine light illuminates.