Need help for building a pid controled robot

my robot is not at all following the line.

Do you KNOW that the robot is reading the sensors correctly?

Reading the 5 sensors, adding up the values, and determining an average will tell you nothing about where the line is. I think you are barking up the wrong tree. As a matter of fact, I don't think you are even barking in the right forest.