Quantcast
Channel: Microcontrollers, Programming and IoT
Viewing all articles
Browse latest Browse all 1271

Problem with sketch

$
0
0
I have modified a sketch to attempt to control 2 servos using separate pots. The servos just jitter around and only one will move when both are connected. If I disconnect the one attached to A0, then they both move simultaneously.

Code:
// Controlling a servo position using a potentiometer (variable resistor)
// by Michal Rinott 

#include <Servo.h>
Servo myservo0;  // create servo object to control a servo
Servo myservo1;
int potpin0 = 0;  // analog pin used to connect the potentiometer
int...
Problem with sketch

Viewing all articles
Browse latest Browse all 1271

Trending Articles