help with my code, lm35dz

Good, could you help me with a code I am new and I do not have much experience, I have this code:

int retardo=5;
int dato_rx;
int numero_pasos = 0;
String leeCadena;

void setup() {
Serial.begin(9600);
pinMode(11, OUTPUT);
pinMode(10, OUTPUT);
pinMode(9, OUTPUT);
pinMode(8, OUTPUT);}

void loop() {
while (Serial.available()) {
delay(retardo);
char c = Serial.read();
leeCadena += c;
}
if (leeCadena.length()>0){
dato_rx = leeCadena.toInt();
Serial.print(dato_rx);
Serial.println(" Grados");
delay(retardo);
dato_rx = (dato_rx * 1.4222222222);
}

while (dato_rx>numero_pasos){
paso_izq();
numero_pasos = numero_pasos + 1;
}
while (dato_rx<numero_pasos){
paso_der();
numero_pasos = numero_pasos -1;
}
leeCadena = “”;
apagado();
}

void paso_der(){
digitalWrite(11, LOW);
digitalWrite(10, LOW);
digitalWrite(9, HIGH);
digitalWrite(8, HIGH);
delay(retardo);
digitalWrite(11, LOW);
digitalWrite(10, HIGH);
digitalWrite(9, HIGH);
digitalWrite(8, LOW);
delay(retardo);
digitalWrite(11, HIGH);
digitalWrite(10, HIGH);
digitalWrite(9, LOW);
digitalWrite(8, LOW);
delay(retardo);
digitalWrite(11, HIGH);
digitalWrite(10, LOW);
digitalWrite(9, LOW);
digitalWrite(8, HIGH);
delay(retardo);
}

void paso_izq() {
digitalWrite(11, HIGH);
digitalWrite(10, HIGH);
digitalWrite(9, LOW);
digitalWrite(8, LOW);
delay(retardo);
digitalWrite(11, LOW);
digitalWrite(10, HIGH);
digitalWrite(9, HIGH);
digitalWrite(8, LOW);
delay(retardo);
digitalWrite(11, LOW);
digitalWrite(10, LOW);
digitalWrite(9, HIGH);
digitalWrite(8, HIGH);
delay(retardo);
digitalWrite(11, HIGH);
digitalWrite(10, LOW);
digitalWrite(9, LOW);
digitalWrite(8, HIGH);
delay(retardo);
}

void apagado() {
digitalWrite(11, LOW);
digitalWrite(10, LOW);
digitalWrite(9, LOW);
digitalWrite(8, LOW);
}

The aim of the code is to move a stepper motor in 360, entering the degrees in the serial, how can I modify this code to put a temperature sensor lm35dz, so that with different temperatures the motor rotates.

example:
at 22 degrees Celsius the engine is at 0 degrees, and when the engine rises to 30 degrees Celsius the engine is at 90 degrees and if it goes back to 22 degrees Celsius it returns to 0 degrees

Thank you very much for your time and help.

you could use
analogueRead(temp sensor); then an do some math so stepper. step(temp read*number of steps to rotate desired value.
from your question it looks like you want it to rotate 11.25 degrees per 1 degree Celsius change in temp. take into account what motor you have and how many steps it takes for one full rotation to find out how many steps the motor should step.

I explain myself in a better way, I am doing a window regulated by temperature, I wish that for each 5 degrees of temperature it is a quantity of degrees of the motor.
An example.
If the ambient temperature of the place is 25 degrees the window (motor) will be at 22.5 degrees. If the temperature goes up the window will open and if the temperature drops the window closes.

if you could write the code it would be great. and thanks in advance for reading my post

The above code still applies,
since you are looking for a specific value from your sensor my assumption is that they would want it to be connected to an Analogue pin because it can read values from 0-1023. But then again maybe your sensor does not require the use of an analogue pin and can be attached to a digital pin. stepper motors aren’t driven by degrees of rotation. They are driven by steps, different steppers can have different total steps per revolution, 200 steps is fairly common. So you will need to check to see what your motors is. Use the #include <Stepper.h> library in your code. You can find many tutorials on youtube and google as well as in the examples in the arduino IDE. you will also need a stepper driver to drive it most likely, the stepper A4988 is a good choice. Once you had set up your stepper and variables.

your code should have something along these lines:

analogueRead(sensorpin);

yoursteppermotor.Step(sensor pin Value * the number of steps to rotate the motor the amount you want for that temperature);

Jose, look up stepper motor controlled by potentiometer. It would be similar to stepper controlled by temp sensor.