robotic movement using genetic algorithm and ardunio

There's also another hole in what you're asking. You say you know about genetic algos, and that you need help with the coding. But before you do that you need to clarify in your mind and explain here, exactly how you anticipate a GA being a part of your robot.

In parallel with that, I would be inclined to put the specifics of the robot aside, and write a standalone GA sketch to find the maximum of some simple mathematical function in some range. That way, you can find the maximum analytically or graphically, and test your GA code against an expected result to see if it works.

Then you may be able to convert that GA sketch into a function which you would use in your robot code.