Questions tagged [servo]

Programming questions related to controlling a servo motor through programming.

A servo is a hardware mechanism that moves with signal input. It uses negative feedback to control itself precisely.

297 questions
-2
votes
1 answer

How do I get Arduino to return to 0 degrees after turning to 90 degrees

I am working on a project at the moment that deploy a model rockets parachute. I am not very skilled at coding so I thought I would ask here. The code is designed to press a button on the ground with a timer and then the parachute is deployed by the…
Kyle Ross
  • 3
  • 3
-2
votes
1 answer

Using servo library in tinkercad causing weird behaviour

I am using analogWrite() in my code. Everything works fine when I am not using the servo library. In other words, everything is fine when I disable this line //servo_9.attach(9); If I enable this line, the PWM will be wrong and weird. Any idea why…
Mohamed Ibrahim
  • 191
  • 1
  • 12
-2
votes
1 answer

expected primary-expression before token ','

Ok so I have been trying to make a sound controlled servo with an Arduino code and I seem to be doing something wrong. What is happening is i am testing the code with the built in checker to the program and it keeps giving me an error code…
-2
votes
1 answer

Servo goes to 270 degrees when it should be 180 degrees

I have a 270 degree servo motor (LD-3015MG) hooked up to an Arduino. The problem I'm having is that the angle I set it to, does not match the actual angle it actually goes to. Here's the Arduino code: #include Servo myservo; // create…
sparpo
  • 99
  • 2
  • 4
  • 11
-2
votes
1 answer

Connect Adafruit_PCA9685- I2C interface in Raspberry pi Python

How to Connect Adafruit_PCA9685- I2C using Raspberry Pi and Python?
Borhan Uddin
  • 37
  • 10
-2
votes
1 answer

Line following, finding the centroid, and having the robot stay on that center point

I'm having trouble running the last part of my code here. Im using Raspberry Pi, OpenCV, PiCamera, and servo motors. NOT SHOWN i have the code to find the centroid, and from the centroid it will then determine how far off '160' it is. Im not totally…
-2
votes
1 answer

Servo Motor using Netbeans And RXTX

I have an arduino code for my Coinslot and Servo Motor, my question is how can I set the Port Identifiers of Coinslot and Servo Motor, because everytime I inserted a coin my servo motor also moves
Vhey
  • 37
  • 1
  • 11
-2
votes
2 answers

control servo using android

Asked question master, how to coding in arduino for controlling servo using android via bluetooth? Code below does not work, servo only runs between 48 - 56. #include #include #include Servo servo; int…
Rifki Arif
  • 13
  • 2
-3
votes
1 answer

I need some help on a project for Arduino (I'm new to coding)

I am creating a project with Arduino Uno and some other parts such as: Mg996r servo1 (connected to a elevator system) Mg996r servo2 (connected to a rotating tap) a 4 channel relay that is connected to 4 vacuum pumps Momentary switch x4 The problem…
-4
votes
1 answer

C what is wrong with function?

Hi i have problem with function to control my 4servos. I want to take this code to function but it's not working. volatile float servo1; variable= uart_getchar(); _delay_ms(100); variable=variable/10; …
Mateusz
  • 35
  • 6
-8
votes
1 answer

I can't see a mistake in my Arduino code.

Here is my code and when I put it into the Arduino IDE it says: "expected primary-expression before ',' token" I think I forgot somewhere a dot or I made a little mistake in the if class. Thank you very much for your help. Code: #include…
1 2 3
19
20