The best way is for you to define what information Processing needs to send to the Arduino, to "control" the stepper motor.
How is the stepper motor connected to the Arduino? What does it need to do, in response to some input from Processing? Turn a fixed number of steps? Turn a number based on what Processing says? In which direction? At what speed?
Once you can answer those questions, sending the required data from Processing to Arduino is simple. Defining how to send that data in a way that the Arduino can store and parse it is relatively simple. Storing and parsing the data is trivial. Using the parse data is trivial.
I do understand how a stepper motor works. The range is an example. A range from 0 to 100. Where 100 could mean I want to rotate it 9 times to the right.
The values that you say you want to send all fit in a byte. Have Processing send one byte for each movement needed.
Have the Arduino determine if there is at least one byte to read, and, if there is, read that byte and do something.
Serial.available() and Serial.read() on the Arduino side, and Serial::write() on the Processing side.
You are still to vague on what you want to do to offer any more help. How does the value 100 translate into 9 turns? How many steps is that? How do you expect to rotate the other direction?
I have a number from 0 to 100 in processing. 100 means that the pen of the plotter (it's like a plotter device) should be 100pct to the right. 0 means it should be left.
I have a number from 0 to 100 in processing. 100 means that the pen of the plotter (it's like a plotter device) should be 100pct to the right. 0 means it should be left.
The advice in the previous reply holds, then. All that the Arduino will know is what percentage of the total travel the stepper motor should be at. You will need to maintain a current step count, and know how many steps are required to travel from one limit to the other. Given the last directed percentage, the last step count, the total step count, and the new directed percentage, you can work out how many steps to step, in which direction. Then, all you need to do is step that number of steps.
With the wiring that you have, you have to set the state of 4 pins in the correct order to step. Which pins, and which order, depends on where the motor is now.
Using a stepper driver makes stepping a lot simpler, since it keeps track of which pins to activate next.
Presumably, the code that went with that wiring defines how to make the stepper step. Hopefully in a way that is easy to use.
and also send the speed.
The speed of a stepper motor is controlled by the delay between steps. Use smaller values to step more often. The limit is a function of the voltage that the motors are operating at and the current capacity of the power supply. Stepper motors need a lot of current.