Stack Exchange Network

Stack Exchange network consists of 175 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

Questions tagged [servo]

A servo is a type of motor which uses a feedback mechanism for precise control of speed and position.

0
votes
1answer
42 views

Wanted to control 2 servos with serial read [on hold]

I want to use 2nd servo only when 1st is in up state by asking user whether he wants to fire or not.(code in bold is not working ) #include <Servo.h> Servo myservo; Servo trigervo; ...
0
votes
0answers
18 views

Joystick Bluetooth to Bluetooth to Motors [UPDATED] [duplicate]

I have updated the code, switching the Bluetooth sensors because my codes were switched(master was slave, and slave was master), putting the hc05s on the same baud rate, and removed certain comments, ...
0
votes
0answers
9 views

How to hook up led matrix 1088AS to a PCA 9685 servo controller? there is a way?

I'm confused about the pinout, I can't figure out which fisical pin of 1088as red led matrix must to hook up to the PCA9685, if there is a way to do this I found this image the final target is to ...
0
votes
1answer
31 views

Slow speed with stepping motor

I am currently working on a project where i need a stepping motor and a servo running at the same time, the servo turns fine and the speed is ok, but the stepping motors speed is very slow and as a ...
0
votes
0answers
3 views

Servo arduino using eneloop [migrated]

Say if i use 5x eneloop AA batteries to run 6x MG996R servo, will it be good enough since im afraid for the motor if it will burn out. I already read the spec sheet what im afraid is the stall current
0
votes
1answer
40 views

I am building an robotic arm by using flex sensor, servo and 2 xbees

Rx Code: #include <Servo.h> Servo myServo; void setup() { Serial.begin(9600); myServo.attach(9); delay(5000); myServo.write(0); } void loop() { while(Serial.available()==0); int d = ...
0
votes
1answer
38 views

Linear Actuator Arduino Control

Update: Here is my first try based on the code I found and it did not work. The first time I uploaded it, it move to the "current positional value". But did not do the void loop part. Just holds the ...
-1
votes
1answer
27 views

Brushed ESC won't move slowly [closed]

I'm trying to control the brushed motor in a Traxxas Slash RC car with the built-in XL5 ESC using the Servo library on Arduino. I previously had success controlling this car with a Pololu Micro ...
0
votes
1answer
43 views

Basic Arduino Airplane Control

I have a task where I need to control the airplanes thrust and altitude direction(Up-Down). For the thrust I thought of using a DC Motor and a Servo for the other. Control of servo will be from the ...
0
votes
0answers
37 views

Multiple Servo motors with an ultrasonic sensor

I am building a robot arm with 6 servo motors that works with an ultrasonic sensor. The purpose of the program is when an object is detected at 20 cm (fixed position) from the sensor, the buzzer and ...
0
votes
0answers
21 views

DOIT Dev Kit V1 (esp32) as PCA9685 power supply [closed]

I'm attempting to connect 8 servo motors to my esp32 Dev Kit and control them with the PCA9685. The problem is the Dev Kit doesn't have a 5v output to power the pca9685 but I'm wondering if it's ...
0
votes
1answer
32 views

Attach() resets servo's angle

I'm working on code that will control micro servo. I use generic servo and built-in library for controling servo. Microcontroller is generic STM32. Controlling servo Works as expected. But I don't ...
0
votes
1answer
40 views

Servo delay problems

So I had a test last week with the Arduino Uno starter kit. We got a task including the servo. I had to get the servo to go from 0 to 90 degrees and it was supposed to use 4 seconds to do so. Than ...
1
vote
1answer
61 views

How to execute operation once till a condition then restart it from start [closed]

I am making a project using IR sensor,servomotor and Push button. I am not able write code for the logic as stated: it will execute the operation when it reads the digital value of IR high and rotates ...
1
vote
1answer
54 views

Hold button / press button/ push button

I want to control a servo motor in a way that if you push the button, you can control it by potentiometer a if you push double time, you can control servo with infrared if you hold button step ...
0
votes
0answers
22 views

Servo doesn't move with fingerprint

I've a project which i need to make a door open and close using the fingerprint. I've successfully made fingerprint works just fine it reads and confirm the fingerprints stored in it but the servo ...
0
votes
2answers
44 views

Servo Motors PWM pins, Arduino Uno

I wanted to understand how people are connecting a servo motor to pins without PWM, so I went searching and I read that the Servo library uses the timer1 of pin 9 and pin 10 to be able to use other ...
0
votes
0answers
16 views

Will this power supply work with a MG-996R Servo?

I'm trying to power a tower MG-996R servo with this universal AC power adapter for an arduino uno project. The adapter can output: 3V/4.5V/5V/6V/7.5V/9V/12V.Output current:1.2A, also has a USB port:5V ...
0
votes
1answer
29 views

Code causing Servo motor not to work!

My sketch is compiling and loading, but when the program runs, the Servo motor does not work. The buttons work, the LED light works, Piezo buzzer plays the melody, the Stepper motor works but not ...
0
votes
2answers
18 views

Servo starts to shake when I added SIM900.begin(19200);

Hello I'm working on this mini project. This project works this way, Whenever someone type wrong password, LCD will display "Access Denied" and send an alert to sms using GSM module. I used 2 ...
0
votes
0answers
15 views

Cannot access a servo library with my program

As I tried an new exercise, I came to an other problem. although I put an include in my system (#include ), the program will not acknowledge (Servo myservo); and again a problem? Any help?
0
votes
1answer
46 views

Trying to power multiple servos at once using a Arduino Mega

Recently I have been trying to do a project for my end of year project, it involved making a humanoid arm. I am still a newbie at these things, I usually have my friend do the wiring, but since he ...
4
votes
4answers
165 views

How do I make a Servo Stop if it Hits Resistance?

I am trying to make a device which will turn a turn key with a servo. However, I want it to stop turning the turn key if the resistance is too great (meaning it is locked and will not ever turn). ...
0
votes
0answers
30 views

Question about controlling servos with PWM while being able to accurately read the current from a sensor

Hi I am hoping to design a custom board ATMEGA32u4 with practically a Arduino leonardo bootloader. I plan to control up to 12 servos while being able to read back the current sensor voltage of an ...
0
votes
1answer
41 views

Newbie question: Set servo at certain degrees when something happens

I am trying to set my servo at f.e. 90 degrees when the friendlyValue of the soil sensor is < 50%. The servo isn't moving at all, is it because the code is running too fast and the servo doesn't ...
0
votes
1answer
31 views

servo starts rotating whenever it is plugged

I am making a fish feeder using an Arduino Mega 2560, servo motor SG90 and RTC DS3231. I want to make it rotate twice a day, i.e. morning and 9 o'clock evening. Whenever I plug my Arduino board to ...
0
votes
3answers
60 views

NEED Help With Servo motor

I have just bought a MG90s tower pro servo for my school project and there is a problem. As soon as I connect my servo to the cnc shield or directly arduino, the whole arduino board turns off. I ...
0
votes
3answers
88 views

Why a servo doesn`t move to angles properly

I've got to do a project which uses a servo to drive a turntable. How much I adjusted the angle, the servo seemed to shift every time it spinned. For instance, the 0 degree angle was getting a bit ...
0
votes
0answers
55 views

Servo motor rotates back to 0 after reaching destination

I am using a XMG-996R servo motor. It is controlled by and Arduino Uno board. The problem is when I tell it to go to a certain angle, it will rotate to the desired position but then return to 0. The ...
0
votes
1answer
177 views

How to use map function

if(pin10==HIGH) val=analog.read (potpin); val=map(val,0,1023,0,180); servowrite(val); else val=map(0,1023,0,90); ...
0
votes
1answer
33 views

Intermittent jittering servo

I'm controlling a Hitech HS-625MG servo from a 10k slider via a Nano. For a while the motion tracks the slider position even when moved quickly. Then, for no reason I can find, it will stop following ...
0
votes
1answer
39 views

ATMEGA 328P Standalone on 3.3v controlling a servo

I'd like to use an ATMEGA 328P on standalone mode powered by a 3.3V supply source to control a servo (which is powered by 4 AA batteries, resulting in 6V). My question is: do I have to convert the PWM ...
1
vote
2answers
187 views

Can't drive servo

I purchased a 20KG Digital Servo, DS3218MG with a Control Angle of 270° . I am trying to get it to rotate with the following code: #include <Servo.h> Servo myservo; // create servo object to ...
0
votes
1answer
48 views

The servo sweep library code - “delay” versus “in steps of”

This is a pretty basic question - essentially I want to know the difference between adjusting the basic sweep code (from the library) in terms of the "delay" instruction and the "pos += 1" (in steps ...
-1
votes
1answer
119 views

Servo can be moved only in steps of couple degree

I have Feetech FS5323M servo, with Sweep example code from Arduino site, it works fine, it rotates from 0 to 180 degree and back as expected. The problem comes when I try to set servo position. I've ...
0
votes
1answer
121 views

Does SoftwareSerial and the servo library produce interrupt conflicts?

I'm planning a project that will involve multiple serial ports and the Arduino servo library. I have heard that this may cause interrupt conflicts. Are there any simple solutions to this
0
votes
2answers
364 views

Connecting an Arduino to a servo with an external power supply

I have purchased an MG995 servo (4.8-7.2V operating voltage, 170MA no load operating current draw) and will power this using a 5V, 2A mains plug pack. Do I need a breadboard to connect this with my ...
0
votes
2answers
35 views

Connecting a servo motor to an Arduino

I currently have a push solenoid connected to my standard Arduino board. The Arduino is powered via its USB cable, while the solenoid is powered using a 12V Huawei adapter (in conjunction with a ...
0
votes
1answer
152 views

How to change speed of multiple servos acting at the same time with PCA9685 module?

I'm using the PCA9685 module with its Adafruit library. In my code I have one object of the servodriver class that has 14 channels (controlling 14 servos basically). void Positioning(){ ServoDriver....
0
votes
1answer
375 views

Controlling a servo motor with a touch sensor

I want to modify my code to move a servo motor only for the duration of time that the sensor is touched and stop moving immediately when the sensor is no longer touched. The code I have moves the ...
0
votes
1answer
36 views

Servo going up to the limit as soon as attached

I have a Futaba S148 servo (https://servodatabase.com/servo/futaba/s148) connected to an Arduino Uno. As soon as the script attaches the servo, it rotates to its limit and gets stuck. I've tried ...
0
votes
1answer
60 views

Question regarding Servo including Serial monitor display

I tried to make code following your instruction about millis, and it looks like this. Unfortunately, it is not working. Is there problem with my code? Here is my code: #include <LiquidCrystal.h&...
0
votes
1answer
317 views

PCA9685 servo shield not working

Im working on a project where I want to connect 32 servos together. I got: -Arduino uno -2 PCA9685 16-Channel 12-bit PWM/Servo Shield -power supply 5v 10 A -All wiring is to the right pins (I have ...
1
vote
1answer
144 views

Flickering LED when servo moves

I just got to play around with Arduino lately so I'm really new on this stuff and sorry for the grammar error. I got a work where I need to turn the LED on all the time, my plan is to add a slow fade ...
0
votes
1answer
61 views

Making simple on/off IR servo movement.

I'm new to Arduinos and programming. I'm getting into a project and one of my tasks was to learn how to incorporate servos into Arduino and learn about sensors. I wanted to combine both, but I'm ...
0
votes
1answer
63 views

How to connect Mg995 and arduino nano since nano can only output 40mA at max?

Datasheet for Mg995 shows: Current draw at idle 10MA No load operating current draw 170MA Stall current draw 1200MA Maximum current that an arduino nano can output is 40mA. So, what ...
0
votes
4answers
117 views

How to repeat the code

I want to make my biped robot keep walking, but it only move for twice, this biped robot project is important for my Capstone project. The code below is the code that I used #include <Servo.h> ...
0
votes
1answer
37 views

Rc car which returns to middle when left or right button is not pressed

Hi i am currently working on a school project , my only problem is that i want my RC car to return to middle direction (which i have set to 66 in the servo motor) when the left or right button is not ...
0
votes
2answers
109 views

How to move Servo in between three positions

I want my tower pro 9g servo to start from pos=0, wait there for 1 second, then reach pos=90 wait for 1 second, then reach pos=180 and wait for 1 second. Now it goes back to pos=0 and repeats this ...
0
votes
0answers
126 views

Servo.h and ServoTimer2.h difference

So i'm trying to code a servo motor to turn left when a button is pressed and turn right if another button is pressed i already have a code for it on the servo.h library but it has a problem with the ...