Hello, I have a ‘96 Corolla with 166k miles. I’ve had some basic stuff motor mounts and radioator and tune up done since I’ve owned it, for about a year, and she runs great for her age but I all of a sudden got the PO340 check code. My friend said the camshaft sensor should be on engine but from what I’ve read on here it’s in the distributor? I bought the sensor and I guess need to get the distributor as well? The car was running fine before the code came up only a couple times on a very cold day it hesitated to start right up and haven’t lost power or other issues I’ve read. When I drove it a short distance last week it was chugging and had some misfire at idle and ran rough I also had almost run out of gas so my buddy put about a gallon of gas in so I could make it to the gas station he said gas wasn’t even six months old anyway I have never had this code come up on any of my Yotas and need to get it fixed asap so I can get to work. I just want to make sure I have all the parts and the location of the sensor before I get under the hood thanks