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
1 answer

Issues with RGB led and Servomotors

I'm on my first Arduino project... On this project, I use an RGB led and 2 Servomotors... First off all, following OOP, I create a class to control my RGB led... class StatusLED { private: int pinRed; int pinGreen; int pinBlue; …
BrunoTS
  • 171
  • 2
  • 17
1
vote
0 answers

How to completely stop a continuous rotation servo using pyfirmata

I recently purchased four continuous rotation servo motors (FS90R). Using an Arduino Uno, Pycharm and pyfirmata, I wanted to test the various speed caps of the servo. I used this piece of code: from pyfirmata import Arduino board =…
Jeffrey Lan
  • 90
  • 13
1
vote
1 answer

How to control multiple servos with a PS4 Controller using Processing Game Control Plus

I passed the last 3 days trying to figure this out with my basic programming knowledge and this is what I achieved: Collect data from PS4 controller with a Processing program and send it to Arduino through Serial port being able to control one servo…
1
vote
2 answers

Controlling a servo at Raspberry Pi with Springboot and ServoBlaster

I am trying to control a servo motor from a web interface. I am using SpringBoot 2.0, ServoBlaster and pi4j. In order to start the application I am running as root ./gradlew bootrun --no-daemon. It has to be root in order to handle the GPIOs and I…
LiTTle
  • 1,811
  • 1
  • 20
  • 37
1
vote
1 answer

How to control a servo with serial input in combination with potentiometer

I want to control a servo with serial input in combination with a potentiometer. The servo can be controlled separately. If I comment a part of code like serial input, then I can control the servo via potentiometer, If I comment the part of code of…
Haffoo
  • 13
  • 2
1
vote
0 answers

Knob control of servo with rfid

#include #include #include Servo myservo; int potpin = 0; int val; #define SS_PIN 10 #define RST_PIN 9 MFRC522 mfrc522(SS_PIN, RST_PIN); void setup() { Serial.begin(115200); SPI.begin(); …
1
vote
1 answer

Servo doesn't respond as expected

I am using an Arduino for the first time to control the level crossing gates on my model railway using an LDR and two servos. I want to have a train run over a photo resistor (LDR). On this event, the gates should close. When the train has passed…
1
vote
1 answer

Java to Arduino communication out of sync - leap motion

I'm trying to control a robotic arm with a leap motion controller. Right now I'm just controlling two servos. I'm using java to read data from the leap motion, process and format it, and send it to the Arduino. The Arduino just receives the data,…
1
vote
0 answers

RPi servo stops responding to python code after a couple seconds

I'm attempting to use the SG90 servo as a steering mechanism for a RC car I have successfully gotten it to respond with A (left) and D (right) but after a few seconds of not inputting any instructions, it stops responding and locks up at a certain…
Atzin
  • 127
  • 11
1
vote
2 answers

Servo motor issue

I have a problem in my project. If there is an available parking lot, I want the servo to rotate 90 degrees. I used two sensors, one for the car's entry and one if cars want to leave. This is my code: for(int i=0;i<11;i++) { if (parks[i]!='0' &&…
Fatemah
  • 11
  • 2
1
vote
1 answer

arduino auto servo movement signal from python

how do i change the if statement in arduino in order to move the servo the same degrees as whats randomized in python? First he's the python code: import serial import time import random arduinoData = serial.Serial('com4',9600) while True: …
1
vote
1 answer

Controlling RFID RC522 and servo motor in one program

I'm working on a project where I'm trying to turn a 5V servo motor (9g) when RFID RC522 detects a card. I'm using a Raspberry Pi 3 B+, Python RPi.GPIO lib and another lib: SimpleMFRC522 for the card reader. I run into a problem where I can't set…
1
vote
0 answers

Multiple libraries were found servo.h

Multiple libraries were found servo.h error. Please help to fix. I am getting this error: Error: Arduino: 1.8.5 (Windows 8), Board: "NodeMCU 1.0 (ESP-12E Module), 80 MHz, 4M (3M SPIFFS), v2 Lower Memory, Serial1, None, Only Sketch,…
1
vote
0 answers

How to move a delta ASDA-B2 motor to position x and y?

I want to write a method which gets two number, x and y and move the servo to the correct position. x and y are the position of an object in an image which I extracted before. I have no idea how to move the servo in java. I skimmed the manual and it…
Amiri
  • 2,417
  • 1
  • 15
  • 42
1
vote
1 answer

Hexapod Servo Controller Issue - Adafruit PCA9685 16Channel

I'm creating an Hexapod using a Raspberry Pi 3, 2 X 16 Channel Adafruit PCA9685 servo controller chained, and multiple Tower Pro MG995 servos for the limbs. Issue that I've encountered is that when connecting multiple Servos to the controller and…
Henrique R
  • 94
  • 7