BNSS - IoT & Robotics Training

OBJECTIVE

Design and implement a system with an Arduino Nano to control a servo motor, rotating to specific angles like 90 or 180 degrees based on user input or sensor data.

MODULES REQUIRED

SCHEMATIC DIAGRAM

Connect Servo Motor:
ARDUINO CODE
JavaScript
#include <Servo.h>
Servo servo_pin_2;
void setup(){
servo_pin_2.attach(2,530,2600);
}
void loop(){
servo_pin_2.write( 0 );
delay( 2000 );
servo_pin_2.write( 90 );
delay( 2000 );
servo_pin_2.write( 0 );
delay( 2000 );
servo_pin_2.write( 90 );
delay( 1000 );
}

INSTRUCTIONS

WORKING

IOT Projects

ARDUINO NANO WITH SERVO MOTOR

/ /

ARDUINO NANO WITH SERVO MOTOR

OBJECTIVE

Design and implement a system with an Arduino Nano to control a servo motor, rotating to specific angles like 90 or 180 degrees based on user input or sensor data.

MODULES REQUIRED

SCHEMATIC DIAGRAM

Connect Servo Motor:
ARDUINO CODE
JavaScript
#include <Servo.h>
Servo servo_pin_2;
void setup(){
servo_pin_2.attach(2,530,2600);
}
void loop(){
servo_pin_2.write( 0 );
delay( 2000 );
servo_pin_2.write( 90 );
delay( 2000 );
servo_pin_2.write( 0 );
delay( 2000 );
servo_pin_2.write( 90 );
delay( 1000 );
}

INSTRUCTIONS

WORKING