Operating Servo Motors Using Arduino || Circuit design with Breadboard || Micro controller Programming
Definition: A servomotor is a rotary actuator or linear actuator that allows for precise control of angular or linear position, velocity and acceleration.It consists of a suitable motor coupled to a sensor for position feedback. It also requires a relatively sophisticated controller, often a dedicated module designed specifically for use with servomotors.
Circuit of Servo motors:
Circuit Design Servo Motors |
Servo Motor Example
Example Servo Motor:
Circuit:
|
Example Servo Motors |
#include<Servo.h>
int position=0,i=0,j=0;
Servo servo_9;
void setup()
{
servo_9.attach(10);
}
void loop()
{
for(position=1;position<=180;position+=1)
{
servo_9.write(position);
delay(20); // Wait for 1000 millisecond(s)
}
for(position=180;position>0;position-=1)
{
servo_9.write(position);
delay(20);
}
}
Assignment Task Submission:
Instruction for the Task:
- Create word file and record video of your running code.
- design the circuit and attach screenshot in the word file.
- your program should rotate the servo motor at 45 degree, then 60 degree and then 180 degrees with the delay of 3 seconds.
- your code should be commented well before you submit it.
- word file should also contains your code file.
- Upload Assignment to Link
Post a Comment