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
1
vote
0 answers

Servo keeps jittering Arduino code for servo motor jittering

Servo keeps jittering at start up, buttons only reset to initial position being held, if let goes back to jittering. There is a line of code as well for an osciloscope but im not using it if you can please point it out, also this is the original…
1
vote
0 answers

Execute Code for Servo One time When Switch Toggled

I am trying to get the Servo to rotate from 0 degrees -> 90 degrees -> 0 degrees one time when the toggle is switched on, and then reset when the toggle is switched off. Any help would be appreciated! Thank you. #include Servo myServo; //…
1
vote
1 answer

How do I turn a Fitec FS90R servo motor 90 degrees clockwise and anti-clockwise using a PIC18F4550

I have tried varying the duty cycle of the servo motor but it only turns 180 degrees clockwise and anti-clockwise.
user17862830
1
vote
1 answer

how to set servo to rotate only once in 1 condition

I want to make a gate using 360 servo and ultrasonic sensor, here I use if else. when ultrasonic conditions >= 10 cm the servo should rotate one time to the right for 5 seconds, and vice versa. but when it reaches the condition >= 10 cm where the…
1
vote
0 answers

Qube servo 2 control from simulink on ubuntu 20.4

I got Qube Servo 2 -usb. To run block scheme on this device from simulink you need to install QUARC REAL-TIME CONTROL SOFTWARE https://www.quanser.com/products/quarc-real-time-control-software/ This software is only for windows. I would like to run…
PanZemiak
  • 21
  • 4
1
vote
1 answer

Adafruit's "adafruit_servokit" library returns error on setting angle of servo

I'd like to control a servo by a given angle. I am using a RaspberryPi 4 Model B which is running Raspian. The servos are connected to a Adafruit PCA9685 16-Channel Servo Driver. The servo driver is connected to the RaspberryPi via i2c. Python…
1
vote
1 answer

member reference base type 'volatile unsigned char' is not a structure or union

I was trying to program a PIC 16f877A Micro-controller to rotate a servomotor, 0 to 180 degrees, but every time i try to build the program i get an error "member reference base type 'volatile unsigned char' is not a structure or union".I am using…
1
vote
1 answer

arduino accelerometer with servo motor

I'm currently working on project to operate three motors while sending accelerometer value to computer via bluetooth module. I want the motor operation and value transmission to work seperatly. But when motors operate, the transmission stops. I used…
John Cho
  • 11
  • 1
1
vote
1 answer

Raspberry PI 3 and SG90 mini servo unknown problem

Connection schema servo to GPIO: servo minus (brown wire) - to pin #9 (GND) servo plus (red wire) - to pin #2 (5VO) servo signal (yellow wire) - to pin #11 (GPIO 17) python code - ! works fine from gpiozero import Servo from time import…
GFB
  • 345
  • 1
  • 5
  • 15
1
vote
2 answers

Arduino servo not working when using wrapper and inheritance

I'm building a robot arm which is quite complicated, so I wrote a class with inheritance to control different servos without having to write too much code. The classes look as follows (some stuff is left out): In servoPart.h: #include…
matthesinator
  • 136
  • 1
  • 8
1
vote
0 answers

Servo Moves Upon Plugin. Sometimes to 90 and stops. Sometimes to 180 and back to 0

Newbie here. When I plug the USB into my Arduino to power the project, my servo wants to move around right away. Sometimes it goes to 90 degrees and stops until it is triggered by the ultrasonic sensor. In this case, it starts at 90, goes back to…
Lenny
  • 11
  • 1
1
vote
1 answer

RaspberryPi pigame servo controll

I hooked up a servo onto my RaspberryPi 3, and i want to control it. I am currently using pygame library. It is installed and is a latest version. This is my code : # Import libraries import RPi.GPIO as GPIO import time import pygame from…
Lazaruss
  • 1,107
  • 1
  • 13
  • 24
1
vote
1 answer

Motor servo MG996R rotation angle

I have an MG996R servo motor connected to an STM32. I am programming the micro with the Arduino programmer. The servo motor is used to open a lock. After testing the servo with the lock, because the lock was stuck at certain angles, a noise was…
Hamid Rajabi
  • 59
  • 1
  • 8
1
vote
2 answers

Arduino: How to move a servo without knowing the exact location the servo needs to move to

I am trying to make a solar panel that tracks the sun by comparing the resistance of 4 photoresistors. I have coded the part that determines the resistance of the photoresistors (I am currently only testing with 2) but I am struggling to get the…
1
vote
2 answers

Stuck on function

Greetings, I'm using SG90 Micro Servo for simulating the door lock where the door is unlocked after typing in the password. What I'm trying to do is so the program starts with the servo rotate at 90 degrees angle so it looks like its lock, and then…
Al-
  • 27
  • 7
1 2
3
19 20