and so I need to connect one servo motor to pin 2 on the arduino while the other servo to pin 8. however only pin 2 seems to work and i tried changing the pin combination to 3,8 (didnt work) servo 1 to pin 8 and servo 2 to pin 2 (only pin 2 works)
Can I suggest you leave your code for the moment and just run the SERVO SWEEP code example in the IDE.
This will make it possible to test your servos and the pins you are using?
Can you please post a circuit diagram of your project, including power supplies, use a pen(cil) and paper and show an image of it would be fine.
Please do not use a Fritzy picture
ill be honest, that another problem that ive been trying to solve
i want the servo to only move 10 degrees in either direction from when the gear is in line with the actual motor and nothing i found online is consistent about setting a range
i have uploaded a wiring diagram to imgur with the link in the original post
the board is arduino uno
i just tried the code and this allows the servo connected to pin 8 to work
on a sidenote, it says set servo to midpoint but the angle is more tilted to the right (but the code helps the servo at pin 8 to move so thats fine ig)
sry mb it was a bad drawing i meant to write 8 instead of 3 but the same problem still exists
only the servo connected to 2 would work but with the sweep program works for both servos altho i havnt tried doing it with both servos at the same time
Hi,
Okay so the pin 2 and 3 do work?
Just not with your code with the IMU am I correct?
You need to use the IDE monitor and Serial.begin, Serial.print to help see what your variables are doing.