Sagnik Mukherjee (Lab Exam)

You might also like

Download as pdf or txt
Download as pdf or txt
You are on page 1of 3

Internet of things Lab, AEIE Department, HITK.

Revised July, 2021

Internet of Things Lab

Paper Code: 3251

Lab Exam IOT Lab


Name: Sagnik Mukherjee
Roll No: 1853043
Academic Year: 2018-2022

Heritage Institute of Technology


Internet of things Lab, AEIE Department, HITK. Revised July, 2021

1. What does the command “AT+RST” do?


Ans- (b) Resets the ESP-01

2.
AIM:Demonstrate along with proper circuit diagram the speed
control a simple DC motor
using an Arduino UNO in the TinkerCAD environment.

COMPONENTS REQUIRED: Arduino Uno R3, NPN transistor (BJT),


1 kΩ Resistor, 250 kΩ Potentiometer, DC Motor, Diode
CODE:
int motor_pin=8;
int pot_pin=A0;

void setup()
{
pinMode(motor_pin, OUTPUT);
}

void loop()
{
int pot_val=analogRead(pot_pin);
Internet of things Lab, AEIE Department, HITK. Revised July, 2021

int pot_val_2= map(pot_val, 0, 1023, 0, 255);


analogWrite(motor_pin, pot_val_2);
delay(1000);
}
OUTPUT:

You might also like