This circuit consists of an Arduino UNO microcontroller board and a servo motor. The Arduino UNO is used to control the position of the servo motor by sending pulse-width modulation (PWM) signals through one of its digital pins. The servo motor is powered directly from the Arduino's 5V output and is grounded to the Arduino's ground (GND) pin. The control signal for the servo is provided by the Arduino's digital pin 6 (D6).
IOREF
Reset
3.3V
5V
GND
Vin
A0
to A5
SCL
SDA
AREF
D0
to D13
gnd
vcc
pulse
vcc
(Power supply for the servo motor)gnd
(Common ground reference)pulse
(Control signal for the servo motor)5V
(Power supply from the Arduino)GND
(Common ground reference)D6
(Receives control signal from the Arduino)#include <Servo.h>
Servo Inuka;
void setup() {
// Attach the servo on pin 6 to the servo object
Inuka.attach(6);
}
void loop() {
// Set the servo position to 100 degrees
Inuka.write(100);
}
servo.ino
setup()
function, the servo motor is attached to digital pin 6. The loop()
function sets the servo to a fixed position of 100 degrees continuously.