Problem robotic about the control of the direction of the robot

Hi, I’m doing a school project using the robotic

robotshop.com/eu/kit-robotique-3-roues-omnidirectionnelles-compatible-arduino-3.html

I encountered a problem when I do it

         power button

               Sonar0x11

              --------------
             /              \
                /        \
               /             \
         M1   /              \ M2
             /               \
            /                \
           /                 \
          /                  \
          \                  /
           \                 /
              \                /
             \               /
       Sonar0x12  \                / Sonar0x13
               \                 /
                \            /
             ----------------
                 M3

*/

unsigned char E1=5; // Motor
unsigned char E2=6;
unsigned char M1=4;
unsigned char M2=7;

unsigned char E3=9;
unsigned char E4=10;
unsigned char M3=8;
unsigned char M4=11;

this is a demo code that offered before, but there’s a lot of problem on that
Firstly , I found that there was a motor that not move at all, then I found that’s because

unsigned char E3=9;
unsigned char M3=8;

it’s because these 2 ports not function
then I find that it’s

unsigned char E4=10;
work, but I met another problem is the port M4 which controls the direction of the motor E4 not work
So all of the 3 motors can rotate
unsigned char E1=5; // Motor
unsigned char E2=6;
unsigned char E4=10;

2 motors can control the direction
unsigned char M1=4;
unsigned char M2=7;
one motor can rotate, but always one direction
I dont know why??

Another qustion is that the address 0x11 , 0x12, 0x13 are for the sensors sonars
How can I get the values???

Can somebody help?

Thanks in advance

Please see the sample code attached for a similar platform in order to understand how to run the motors:
[ATTACH]485[/ATTACH]

The sensors use i2C communication, you can find more about them here:
[FONT=arial, sans-serif][FONT=arial, sans-serif][FONT=Arial][FONT=Arial, sans-serif]robot-electronics.co.uk/htm/srf02tech.htm
robot-electronics.co.uk/htm/srf02techI2C.htm
robot-electronics.co.uk/htm/srf02techSer.htm

And some sample code here: robotshop.com/content/ZIP/documentation-20009.zip

[/FONT][/FONT][/FONT][/FONT]