Test code for the 1000 time

here is my schematic


and here is my circut

want to test my code

#include <Servo.h> // Include Servo library if using servo motors

Servo motor1; // Create servo object for motor 1
Servo motor2; // Create servo object for motor 2

const int motor1Pin = 9; // Define pin connected to motor 1
const int motor2Pin = 10; // Define pin connected to motor 2

int motor1Angle = 6; // Define angle for motor 1 movement
int motor2Angle = 15; // Define angle for motor 2 movement

unsigned long previousMillis1 = 0; // Variable for motor 1 timing
unsigned long previousMillis2 = 0; // Variable for motor 2 timing

void setup() {
motor1.attach(motor1Pin); // Attach motor 1 to chosen pin
motor2.attach(motor2Pin); // Attach motor 2 to chosen pin
}

void loop() {
unsigned long currentMillis = millis();

// Move motor 1 every minute
if (currentMillis - previousMillis1 >= 60000) {
motor1.write(motor1Angle);
delay(1000); // Adjust delay as needed for smooth movement
motor1.write(90); // Set motor 1 back to initial position
previousMillis1 = currentMillis;
}

// Move motor 2 every hour
if (currentMillis - previousMillis2 >= 3600000) {
motor2.write(motor2Angle);
delay(1000); // Adjust delay as needed for smooth movement
motor2.write(90); // Set motor 2 back to initial position
previousMillis2 = currentMillis;
}
}

is it right or trash

Without a description of what the code is “supposed” to do, it is not possible to tell if it works or not. The code is structured correctly, so it should compile and upload fine. Whether it does what you want or not is not possible to tell.

Looking at the breadboard and schematic images, the wire that Fritzing sees is not the same as what you probably expect. The rats nest wires for schematic show that power and ground are not connected to all of the parts. That is because it needs more than drawing a wire to another wire in breadboard view to actually create a connection. If all you care about is the breadboard image, there is no problem. But the schematic is incomplete.