Bad Crankshaft Position Sensor

Mazda » Mazda 5 » 2006-2010
Problem Description

My 2006 Mazda5 carols but won’t start and I have this device that read codes and I plugged-in and it says Crankshaft Position Sensor....I’m assuming I guess that Sensor is bad? Is that right? Please hel. And I just replaced the serpentine belt and AC belt too....thank you guys.