Professional Documents
Culture Documents
KOLKATA
DEPARTMENT OF
APPLIED ELECTRONICS AND INSTRUMENTATION ENGINEERING
LABORATORY REPORT
INTERNET OF THINGS LABORTARY COPY BOOK
CODE:-
// C++ code
//
int xvcb = 0;
void setup()
{
pinMode(13, OUTPUT);
}
void loop()
{
digitalWrite(13, HIGH);
delay(1000); // Wait for 1000 millisecond(s)
digitalWrite(13, LOW);
delay(1000); // Wait for 1000 millisecond(s)
}
OUTPUT: -
List of Components:
Name Quantity Component
U1 1 Arduino Uno R3
T1 1 NPN Transistor (BJT)
R1 1 1 kΩ Resistor
D1 1 Diode
M1 1 DC Motor
Rpot1 1 250 kΩ Potentiometer
CODE: -
// C++ code
//
int motor_pin =9;
int pot_pin =A0;
void setup(){
pinMode(motor_pin, OUTPUT);
}
void loop(){
int pot_val=analogRead(pot_pin);
int pot_val_2= map(pot_val, 0, 1023,0,255);
analogWrite(motor_pin, pot_val_2);
delay(100);
}
OUTPUT
List of Components:
OUTPUT: -
Thank You