driving 3 omni wheels robot

i need a code for driving a robot with 3 omni wheels .
the code is expected to receive the desired motion direction and sends the appropriate output to the three motors

Can any one help?

the code is expected to receive the desired motion direction

Really? Using ESP?

and sends the appropriate output to the three motors

What would the appropriate output be?

the desired motion direction is received from another part of the program for instance from a compass sensor
I don't understand what ESP stands for

the output to the motors is the PWM signal that determines the motor speed.

Here's an example/tutorial - not for the Arduino though:

Here's a paper detailing "holonomic control" (warning: heavy math included!):

http://www.mindraces.org/public_references/idsia_publications/omnidrive_kiart_preprint.pdf

Here's the grand-daddy of them all (Palm Pilot Robot Kit):

That should be enough to get you started - heck, that's enough information to complete such a project, if you are inclined to roll up your sleeves and aren't looking for someone to hold your hand through every step...