Name Shashi Ranjan Mehta                     UID 21BCS7093
Class & group: IOT 624 A                     Brach: BE-CSE
Semester: 5th                                Date of Performance: 06/10/2023
Subject name: IoT Lab                        Subject code: 21CSP-344
                          EXPERIMENT 2.3
 1. Aim: Assembling and Controlling of multiple actuators using
    Arduino Uno for any IoT application.
 2. Objective:
    To design and implement a robust and scalable system for the
    assembly and control of multiple actuators using an Arduino Uno in
    the context of an IoT application.
 3. Components Used:
 • 1 x Arduino Uno R3
 • 2 x Servo Motor
 4. Actuators:
 • Servo motor:
    Servomotors have three wires: power, ground, and signal. The power wire is
    typically red, and should be connected to the 5V pin on the Arduino board. The
    ground wire is typically black or brown and should be connected to a ground
    pin on the board. The signal pin is typically yellow or orange and should be
    connected to PWM pin on the board.
• LEDs:
  LEDs (light-emitting diodes) are small, bright, power-efficient lights
  commonly used in electronic products.
  An LED light is a polarized part, meaning it has to be connected to a circuit in
  a certain way to work properly. Specifically, each LED has a positive leg and a
  negative leg. These can be identified visually by length: the negative leg has
  been made shorter.
• Buzzer:
  The buzzer is a sounding device that can convert audio signals into sound
  signals. It is usually powered by DC voltage. It is widely used in alarms,
  computers, printers and other electronic products as sound devices. It is mainly
  divided into piezoelectric buzzer and electromagnetic buzzer, represented by
  the letter "H" or "HA" in the circuit. According to different designs and uses,
  the buzzer can emit various sounds such as music, siren, buzzer, alarm, and
  electric bell.
     5. Script/Code:
#include <Servo.h>
#define Servo_Pin1 3
#define Servo_Pin2 5
#define Servo_Pin3 9
#define Servo_Pin4 10
Servo servo1;
Servo servo2;
void setup() {
 // put your setup code here, to run once:
 servo1.attach(Servo_Pin1);
 servo2.attach(Servo_Pin2);
    servo1.write(0);
    servo2.write(90);
}
int pos = 0;
void loop() {
 // put your main code here, to run repeatedly:
 for(pos = 0; pos <= 90; pos += 1){
   servo1.write(pos);
   servo2.write(pos + 90);
   delay(18);
 }
    for(pos = 90; pos >= 0; pos -= 1){
      servo1.write(pos);
      servo2.write(pos + 90);
      delay(18);
    }
}
6. Output: