Please Help! Programming or Wiring problem

I have made a spirograph and could someone please help me with the code. I have no idea where to start? It has two servo motors and I just need to adjust the speeds of each motor. I could have done the wiring wrong so could someone please help me?
Sorry I’m only allowed to have one photo.

And of course you googled "arduino spirograph" and none of the answers were suitable.
can you explain why they would not work for you?

If you can control the motors, you’re halfway there.
Now you need to develop some code to plot the varying arcs - to achieve the patterns you are looking for.

That's the problem whenever I try to write simple code like this [code]

/* Arduino with multiple servos example code. More info: */

#include <Servo.h>

Servo servo1;
Servo servo2;

void setup()


void loop()

it doesn't work

what does not work?

The motors

Ya Do you think it's a wiring problem?

the servos don't go to the 90° position?

how are they powered, wired etc?

do yourself a favour and please read How to get the best out of this forum and provide all the necessary documentation of your ask.

Ok, I have an Elegoo uno, I'm using 2 kookye micro servo motors which the working voltage is 4.8 v - 6 v and this is the wiring except I'm using only two motors not 4 and I don't have an external power supply.

that's a potential challenge. Your arduino possibly can't provide enough current.

Could I put the code into the arduino, then connect to a power outlet?

do you have a 5V power adapter?

would I need that?

because I don't have one

I found one so I'm going to try it right now

So power the Servos from this adapter and just make sure you join the Arduino GND to the Servos' GND and keep powering your arduino from USB

The motors still aren't moving I've tried everything switching the wires, switching the pins, I've also tried two different adapters. One of them has an output of 4V and the other one had an output of 12V

did you send 12V in your 5V motor ?

do you have a link to your kookye micro servo motors? some are 360° continuous rotation servos.

here you go

yeah, so it's a continuous servo so you don't give it an angle. It seems it needs a full amp so don't power it from your arduino

that's what required to drive it, you don't define an angle like standard servos.

The signal terminal needs to be input with one 50 HZ square wave, then the duration of high level pulse, which is used to control signal cycle, can control speed and forward/backward rotation as well as stalling. The duration of high level corresponds to a speed. When high level is 1ms~1.5ms, servo rotates forward(the rotate speed is the fastest when it is 1ms, the higher the lower, servo will stop rotating when reaching 1.5ms). When high level is 1.5 ~2ms, the servo rotates backward(The servo stops rotating when reaching 1.5ms, when the duration is closer to 2ms, the closer, the faster. The backward rotation speed, the fastest when reaching 2ms)

  • connect arduino GND to Servo GND
  • connect only one servo to your 5V 1A (at least) power supply. Don't go through the breadboard for this. Don't plug it in to the wall yet.
  • connect the control wire to pin D9 of your Arduino
  • connect your Arduino to USB

upload this code:

#include <Servo.h> 
Servo aServo;
void setup() 
void loop() {
 aServo.writeMicroseconds(1500);  // stop
 delay(2000); // 2s wait
 aServo.writeMicroseconds(1200);  // forward
 delay(2000); // 2s wait
 aServo.writeMicroseconds(1500);  // stop
 delay(2000); // 2s wait
 aServo.writeMicroseconds(1800);  // backward
 delay(2000); // 2s wait

power the motor. It should go for 2s in one direction, pause, then go for 2s in the other direction