I think i posted my question in the wrong forum so I post it here now.
I got a Uno board, that based upon what a pixy camera en some other sensors see needs to control 4 motors.
I have to control 4 motors independent from each other.
So while motor 1 needs to get 4000 pulses at 2000Hz
Another motor needs to get pulses too, they need to be controlled independent from eachother.
So motor 1 might be at pulse 3240, and then motor 2 might to do 300 pulses at 200mhz.
At first i was thinking to use Tone(pin, freq, duration) for this, but tone cannt drive multiple pins.
Tone works pin after pin (so after a pin is processed another pin can be tone set.
Besides that tone isnt ideal for doing exact number of pulses.
I must be possible to do this, since reprap printers can also drive 2 motors at once (to set printerhead in xy directions, and meanwhile feeding extruder) so how is this done ?
I notice that the pixy part of my code doesnt always execute at the same speed (depending on what it sees), its not a big problem, because i could also dedicate another Uno for the motors, and use an opto-coupler in between, but then still i need to understand how to drive multiple motors independent from each. So how does that work ?.