Dd you clear the code after fixing the pigtail? Did you inspect the pins inside the connection point inside the sensor for rust/corrosion? If you bought it at an auto parts store, try replacing it under warranty and see if it makes a difference. Sometimes the sensors are bad from the start.
Any mechanic would test areas to rule out issues.. Don't give up
Code P0340
- Faulty Camshaft Position Sensor (most common issue)
- Camshaft Position Sensor harness is open or shorted (I would test this last)
- Camshaft Position Sensor circuit poor electrical connection (the harness was an issue)
- Faulty starter motor (how does/did she start up)
- Starting system circuit (not sure about this)
- Dead (Weak) battery (easy to test with a dmm or auto parts store)