Hello everyone!! Welcome to this post on Arduino Projects!!
Need a short introduction to what the Arduino is then click on LINK
Check out the breadboard intro right HERE
So this was my first time with Servos! Built a super simple system in which the user tells the servo by what angle it should rotate.
Demo:
So this is what my project turned out like:
Things Required:
- Arduino UNO
- Jumper Wires
- Micro Servo
- Arduino IDE on computer
Reference Material:
- Link to video I followed (LINK)
Code:
View on/ Download from Github: (Link)
#include<Servo.h>
int servoPin=9;
int servoPos=90;
Servo myservo;
void setup() {
Serial.begin(9600);
myservo.attach(servoPin);
}
void loop() {
Serial.println("What angle for the Servo?");
while(Serial.available()==0){
}
servoPos= Serial.parseInt();
myservo.write(servoPos);
}
Stay Tuned for upcoming posts on Arduino Projects! We’re on the basic newbie projects right now and slowly, gradually move on to those cool, ultra techy projects!! Want to be the first to know when a new and amazing post comes up?? Then feel free to subscribe!
Happy Learning!!
