3 motors on one arduino

Hi all, I'm back with another question.

I've got 2 arduino's, and 2 dfrobot motorshields which both can control 2 motors. However, the problem I'm running into is as follow:
I've got the following setup: Arduino <-> Java Application <-> Java Application <-> Arduino. I can't change the setup, as it's a school project, and this is the setup they want.

Okay, on to the real problem... I need to control 3 motors from one arduino. Which is not possible since both motorshields can only control 2 motors. One way would be to send a message from the Arduino to a Java Application, to another Java Application, to the second Arduino. This would be a bad solution, since everything gets delayed.

The second way I thought of, was to connect the PWM pin from one arduino, to the other Arduino. Same for the DigitalPin. Then I would control it directly from there. Would it even be possible this way? Or is there an even better (or easier) way to handle this problem?

Cheers!

If you were controlling the motors without the motorshield you could drive one on each of the 6 pwm outputs. You would need some external transistors to buffer the Arduino from the higher power required by the motors.

If you could use continuous rotation servos as the motors you could drive 12 from an Arduino Uno.

...R

It would help to provide some links to the specific boards you have,
so people wouldn't have to guess.

Kontsnor:
I need to control 3 motors from one arduino. Which is not possible since both motorshields can only control 2 motors.

You could get a motor shield that supports three motors. Or get a motor driver board (not a shield) and use as many of them as you need as well as / instead of your stackable shields to support your three motors. Or use the two shields you have but connect one of them via jumper wires instead of stacking it on the Arduino, so that you can redirect the pin connections. Or use a Gobetween shield to swap pins around so that you can stack both shields. Or tell your instructors that the hardware you've been supplied with isn't quite suitable and ask whether they'd like to stump up for the right hardware, or prefer you to muddle through with what you have.

Sorry for my late response, had kind of a chaotic week.

This is the shield I'm talking about: Arduino_Motor_Shield_(L293)_(SKU__DRI0001)-DFRobot

I guess I also solved my own problem. I'm just going to use the SoftwareSerial library to connect the 2 arduino's together. Then I'll just let that listen for a command to start the third motor. This seems to me to be the most easy and cost efficient way to handle this. I'm not going to buy a new motorshield, just for a school project, which isn't going to be used anymore, hence I thougth I'd do it this way.