lboster:
Also referring to the person sayng they dont like the ( == ) i haven't had any issues with that. my resistor dropper holds very well. Thanks again yall!
Sure, sitting comfortably by your PC in your nice warm house. Outside, in varying temperatures, surrounded by and fed with an automotive power system (think EMI)? Maybe not so much. Take some good advice and test for a value in a range. Something like 530 <= analogVal <= 546. This will give the code some tolerance for component/voltage value shifts due to temperature.
Study this state machine tutorial by LarryD. It illustrates many techniques applicable to your project.