Questions tagged [servo]

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

Filter by
Sorted by
Tagged with
0
votes
0answers
12 views

Code for arduino to move servo after taking input from mpu 6050 [closed]

I need to take input from mpu 6050 accelerometer + gyroscope and use that data to move servo motor MG996 how can I accomplish this using arduino or where do I get code for that.I'm fairly new to this ...
1
vote
1answer
26 views

How to determine minimum and maximum angle for cheap servos?

I have some cheap KY66 (seems to be SG90 clone) servos. When I turn them to 0°, the servo tries moving and moving, without actually getting to 0°. I read that they are reaching the endpoint but the ...
0
votes
0answers
21 views

How to run my servo until an input is recieved?

I am VERY new to this so please excuse any silly questions. I am trying to run an FS90 micro servo in a sweeping motion until I receive a certain value from my Adafruit TCS34725 colour sensor. I ...
0
votes
1answer
44 views

Function to control servos

I'm trying to control 6 servos while writing a lean code. I think the function call isn't correctly yet and I think that the variables (pos_n, open_n, servo_1) in the for loop do not get inserted, but ...
0
votes
0answers
17 views

FlexiTimer giving errors in servo motion

I am working on a quadruped bot, spiderbot and I am trying to make a creep gait using Forward kinematics however, for some reason my code stops working after the execution of the line - [pwm.setPWM(...
0
votes
1answer
39 views

arduino uno freezes

Is there a reason why my Arduino Uno freezes after a few minutes of running with power coming from a usb cable connected to my pc? #include <GY6050.h> #include <Wire.h> #include <...
0
votes
0answers
29 views

Servo MG996R - what is the maximum load for very long time?

I am working on a device which will have to periodically switch positions and keep the position for very long time, as accurate as possible, under tension. Never worked with servo motors before, but ...
-4
votes
1answer
35 views

expected '}' at end of input

hi i am getting this error, im guessing i have a bracket missing or one in the wrong place. any help is appreciate, still new at this. thank you (code bellow) #include <Wire.h> #include <...
0
votes
1answer
39 views

Continuous servo speed control with Arduino Uno controller and servo shield

It is very simple device, 2 continuous servos FS5113R, rotates continuously in one direction. Here is device original content, which is this servo shield it looks like russian, and here is library, I ...
0
votes
0answers
20 views

press button: servo move - hold X time - move back issue

Besides being a total noob I've been lurking and reading like mad over the last week to understand how to get my servo to move to X position when a button is pushed, have it wait Y time, and return to ...
2
votes
1answer
23 views

feather 32u4 servo

I am attempting a project where I use a feather 32u4 to control a servo. It is controlled using the buttons on an attached oled featherwing to set the servo to 3 different values. The code that was ...
3
votes
1answer
121 views

Useless box wiring and code

just want to give a back story first. So i saw this video on youtube about the useless box, and i thought that it would make a great gift for my 7 year old. So i went out and bought everything that ...
0
votes
0answers
27 views

How would i add PID control to this servo motor control program. potentiometer

I have installed an AutoPID library (by ryan downing version 1.0.3) to my arduino IDE, but im not sure which parts i will have remove to get the PID to control the servo angle. Thanks for the reply, ...
0
votes
0answers
24 views

Trying to get a servo motor to move to certain setpoints when a control potentiometer shows certain values

Here's my Code so far: void setup() { Serial.begin(9600); } void loop() { float a; float angle; int setpoint; a = analogRead(A1); angle = map(a, 0, 1023, 0, 180); if ( (angle>0) &...
0
votes
1answer
23 views

PWM using timer3 for servo control won't generate any output

I'm making a program for a small robot arm controlled by four servos. Problem: I need for PWM outputs, timer1 has three so i need to use timer3 for the last one The main program and the timer1 ...
0
votes
0answers
28 views

How to control servos on Arduino through Raspberry Pi

I have a couple of servos connected to an Arduino board, which is in turn connected to a Raspberry Pi (4) using an ethernet cable. Just wondering, in what ways can I control the servos on Raspian. ...
0
votes
2answers
87 views

Position Feedback for Stepper Motor

I want to rotate a gearwheel with a stepper motor. While Arduino is on everything is well. My gearwheel transfer its power to a gear worm. The worm will go 10th cm and back repeatedly. When I cut the ...
0
votes
0answers
41 views

Arduino cat feeder

My cat feeder works like that: LCD shows real time clock Press a push button LCD shows you to put the feeding time You put the feeding time through a matricial keyboard When feeding time is reached, ...
0
votes
0answers
26 views

Controlling servo with L298N

I am entering a robot contest, and my bot requires 3 motors and 1 servo. I know I can control the motors with 2 L298N boards, and have an extra spot for a motor with the second board. I was wondering ...
0
votes
0answers
34 views

Program not running when uploaded [duplicate]

I made a simple code for my Arduino Uno with a servo motor: #include <Servo.h> Servo myservo; void setup() { myservo.attach(10); } void loop() { ...
0
votes
0answers
79 views

How do change my Arduino Uno from an unknown device to a port?

I have an Arduino Uno that I have connected to a servo motor. I used an adapter to plug it into my computer and my computer said "Setting up a device, this will only take a minute". When it was done ...
0
votes
0answers
28 views

How to combine button's coding into this servo's coding? [duplicate]

#include <Servo.h> Servo myservo; // create servo object to control a servo // twelve servo objects can be created on most boards int pos = 0; // variable to store the servo position void ...
0
votes
1answer
35 views

I am trying to combine a button's coding and servo's coding. But it is still cannot be verified. What have I done wrong? [duplicate]

include Servo myservo; void setup(){ myservo.attach(8); pinMode(buttonPin, INPUT); } void loop() { myservo.write(0); delay(3); myservo.write(90); delay(3); } const int inPin=8; ...
0
votes
2answers
26 views

multiple invdividual servo controll arduino

I want to declare 11 servo motors in my code. Is there a better way to do that than just declare everyone under each other. The reason is that i have a code that will set the rotation for one at a ...
0
votes
0answers
64 views

Guidance on controlling gimbal brushless motors?

i want to make a gimbal using an arduino and im having trouble finding how to control brushless gimbal motors with arduino as they all go into a BGC ive found a BGMC https://rovertec.com/products/...
0
votes
0answers
45 views

Stepper motor controlled with joystick wont spin anti-clockwise [duplicate]

Im trying to get my Stepper-motor to spin clockwise when joystick is pulled to one side and anti-clockwise when pulled to the other side. Problem is the motor only spins clockwise in both cases. Here ...
0
votes
1answer
57 views

Controlling multiple servos as one

I want to attach multiple servos to Arduino but all them must receive same command. If it possible to connect all servos to one command pin (I don't want to use "for" in code to minimize processor ...
-1
votes
1answer
48 views

Have I fried my arduino uno?

I made a smart dustbin using arduino, servo motor, & ultrasonic sensor. It worked pretty well for a few number of days. But once I don't know how but the Arduino 'ON' light started to become dim ...
0
votes
0answers
84 views

How can I make a fingerprint scanner to work as a toggle for a servo motor using Arduino Uno?

Arduino Fingerprint Project Help Please!! I am a beginner and using Arduino Uno, a fingerprint sensor and a servo motor to build a door lock (school science project). I followed many videos and ...
0
votes
2answers
26 views

Push Button to Drive Power to Servo

I am currently doing a project for a class which uses a few other components such as an LCD, a servo, and such. I want to use a button which acts as a circuit breaker on the Vin of the servo in which ...
-1
votes
1answer
70 views

How to manage button state

Extreme Newbie here ...I am using an Arduino Uno and a PCA9685 16 Ch. Driver board to control servos using a push button and LED feedback. When I pust the button, the servo move but when I release ...
0
votes
0answers
28 views

Servo Sweeper works but specific angle does not

This is my first try controlling a servo. I tried the sweeper example (see https://www.arduino.cc/en/tutorial/sweep) and it works like it should. However, when I try to rotate to specific angles (more ...
0
votes
1answer
55 views

Arduino stops working when servo makes a few rotations

The sketch rotates servo back and forth with buttons. When I rotate servo MG 995/996R 2-4 times Arduino stops working. Its voltage step-down transformer switches from ~9V to ~3.7V which is not enough ...
0
votes
1answer
42 views

Blew my Arduino. Did I wire this correctly?

Hi, I am currently doing a project and it seems that I may have blown my Arduino Nano (or maybe not). The power LED of the Nano was still on and I believe the L pin blinks once every time I press the ...
3
votes
1answer
54 views

When I verify the sketch I get several errors

I am extremely new to Arduino coding and have downloaded a sketch for the PCA9685 to use with model railroading and turnout control. When I verify the sketch I get several errors ... I don't even ...
0
votes
2answers
51 views

Why can't I control speed of the motor? (M1 and E1)

When myservo_1,myservo_2,myservo_3,myservo_4 is commented, I can't control the speed of my M1 motor. But only when I uncomment myservo_1 and so on, I can control the motor speed again. Can someone ...
3
votes
3answers
2k views

How do I extract code from an arduino? [duplicate]

I updated and uploaded some code on another computer that got wiped and didn't send the new code to my current computer, the updated code is still on the board but I don't have access to it. How do I ...
0
votes
0answers
49 views

Attiny85: how to rotate the servo continuously with a press of a button?

I'm trying to use two Bluetooth commands in my code: one is press off a button "1" the servo should do its routine without stop second one press of the a button "2" servo should stop. What am I ...
0
votes
1answer
26 views

Issue with Arduino car bot, the servo motor moves randomly also it turns hot pretty quickly

I trying to create an Arduino avoiding obstacle car. Using Arduino Uno +shield (sensor sheild v5.0). The problem is that when I upload the code, the servo moves randomly (it doesn't rotate to the ...
0
votes
0answers
58 views

Issues controlling servo motors with serial monitor while using 16 channel servo Shield

I am making a 6-axis robotic arm that uses multiple servo motors.The goal is to create a program that accepts degree values from the serial monitor to control multiple servo motors. I have just ...
0
votes
0answers
32 views

Rocket deploy system

I found a code from Astronomica Messier that allows to activate a servo from a Gyroscope MPU 6050 change in direction. I followed the wiring and uploading correctly. The thing is that the MPU is ...
0
votes
0answers
24 views

How do I get my servo to turn using bluetooth, is this a glitch?

I'm very new to coding with arduino so please excuse my naivety, For an electronics assignment I am making a servo turn back and forth using a HM10 BLE however each time I press a button that sends '0'...
0
votes
0answers
46 views

Effective Controlling of Continous Servo Motor

I have difficulty in controlling a MG995 continuous motor. For I know I can control the speed of the motor as writing servo1.write(p) , where the value of p changes the speed of the motor. When the ...
0
votes
1answer
78 views

Controlling a servo motor with two arduinos?

I have two Arduinos, two buttons and one servo motor. I want to control a servo motor with two Arduino's when I pressed the buttons. I linked Arduino PWM pins (first Arduino PWM pin is 9, and second ...
0
votes
0answers
46 views

Servo PWM Pin seems to be interfering with Wire.onRequest i2C function

A newbie here. I am thinking of interfacing Raspberry Pi with Arduino via I2c to control a few servo motor (as RPi have limited PWM pins). Meaning I would send input from RPi to Arduino to allow to ...
0
votes
0answers
42 views

Trouble operating Servo and GPS at the same time

I have a problem using a servo and a GPS board at the same time on an Arduino Uno. For the servo, I use the following code: Servo myservo; // create servo object to control a servo // twelve servo ...
0
votes
0answers
120 views

Unable to control servo with decoupling capacitor and external power supply, but motor shield works

I'm a hobbyist trying to up my arduino and electronics knowledge. I can successfully control a hobby servo using an motor driver shield (https://learn.adafruit.com/adafruit-motor-shield/overview) but ...
0
votes
0answers
581 views

How can I reset servo position?

When I do myServo.write(0) It isn't straight, I want it to be straight but it is at about a 45 degree angle anyone know how to reset the position with arduino to make other positions 0 and making ...
0
votes
1answer
25 views

Possible to have different torque levels on MG966R servo with Rotary Potentiometer?

I want to apologise first and foremost, and say that I am very new to Arduinos! I wanted to control the torque on a MG966R servo so that I can separate it into 4 different torque levels. I read that ...
0
votes
0answers
36 views

RC servo motor initial position

I bought a RC servo motor and I try to run it to both clockwise and anti-clockwise direction. I tried to set the initial position myself but after I power up my Arduino, the servo motor will go to it "...