김찬희gledel
Published © GPL3+

Arduino Project

Connecting potentiometer and servo motor.

BeginnerShowcase (no instructions)30 minutes580
Arduino Project

Code

Arduino Project 2017/6/22

Arduino
#include <Servo.h>

Servo servo0;

int servo0pos = 0;
int analogIn0 = A0;
int analogValue0;

void setup() {
  Serial.begin(9600);
  servo0.attach(2);
}

void loop() {
  analogValue0 = analogRead(analogIn0);
  analogValue0 = map(analogValue0, 0, 1023, 0, 179);
  servo0.write(analogValue0);
  Serial.print("The Value = ");
  Serial.println(analogValue0);
  delay(15);
}

Untitled file

Arduino
Connecting Potentiometer and Servo-motor.
No preview (download only).

Credits

김찬희
0 projects • 0 followers
봉일천고 10316 김찬희
Contact
gledel
100 projects • 116 followers
Looking back on my childhood, I was happy when I was making something and I was proud of myself. "Making is instinct!"
Contact

Comments

Please log in or sign up to comment.