change servo example pin, #68
This commit is contained in:
1 parent
739f98b683
commit
1ede1a6276
2 files changed
+3
-3
No files matched your search
@@ -11,11 +11,11 @@
|
||||
|
||||
Servo myservo; // create servo object to control a servo
|
||||
|
||||
int potpin = 0; // analog pin used to connect the potentiometer
|
||||
int potpin = A0; // analog pin used to connect the potentiometer
|
||||
int val; // variable to read the value from the analog pin
|
||||
|
||||
void setup() {
|
||||
myservo.attach(9); // attaches the servo on pin 9 to the servo object
|
||||
myservo.attach(A1); // attaches the servo on pin 9 to the servo object
|
||||
}
|
||||
|
||||
void loop() {
|
||||
|
||||
@@ -15,7 +15,7 @@ Servo myservo; // create servo object to control a servo
|
||||
int pos = 0; // variable to store the servo position
|
||||
|
||||
void setup() {
|
||||
myservo.attach(9); // attaches the servo on pin 9 to the servo object
|
||||
myservo.attach(A0); // attaches the servo on pin 9 to the servo object
|
||||
}
|
||||
|
||||
void loop() {
|
||||
|
||||
Reference in new issue
Block a user