0% found this document useful (0 votes)
36 views2 pages

EX11

This document describes how to control a servo motor using an Arduino Uno board. The hardware required includes an Arduino Uno, servo motor, breadboard, and connecting wires. The orange signal wire of the servo motor is connected to digital pin 9 of the Arduino. Code is written to import the Servo library and rotate the servo from 0 to 180 degrees over 1 second intervals using the write() function attached to pin 9.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
36 views2 pages

EX11

This document describes how to control a servo motor using an Arduino Uno board. The hardware required includes an Arduino Uno, servo motor, breadboard, and connecting wires. The orange signal wire of the servo motor is connected to digital pin 9 of the Arduino. Code is written to import the Servo library and rotate the servo from 0 to 180 degrees over 1 second intervals using the write() function attached to pin 9.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 2

EX.NO.

11
SERVO MOTOR CONTROL WITH ARDUINO

AIM :

HARDWARE REQUIREMENTS:

S.NO COMPONENTS QUANTITY


1 Arduino Uno R3 1
2 USB Cable A/B 1
3 Servo motor 1
6 Breadboard 1
7 Connecting wires 1

PROCEDURE:
Servo motor wires:
1.Red color wire is always positive
2.brown color is negative which is
ground.
3. orange color is the signal pin which we need to connect to the digital pin of the
arduino
4. connect orange color pin to 9th pin in arduino board.
5. import the servo library file into the arduino uno
software
6.Run the code, the servo motor will be shifting from 0 degree to 180 degree as given in
the code.

CIRCUIT DIAGRAM :
CODE:

#include<Servo.h>
Servo s1;
Void setup()
{
S1.attach(9);
}
Void loop()
{
S1.write(0);
Delay(1000);
S1.write(180);
delay(1000);
s1.write(0);
}

RESULT:

You might also like