IoT for Juniors – Using Sensors & Actuators with Arduino Uno

Blinking an LED

Let’s try to blink an LED every one second.

  1. LED anode to pin 13.
  2. LED cathode to 220 ohms terminal 1
  3. 220 ohms terminal 2 to gnd.

For code click here:

Once you upload the code to the Arduino uno then you will observe that led will turn on and off in every 1 second.

Reading the data from Light sensor

LDR( light dependent resistor changes its resistance as intensity of light changes). Hance detects the amount of light falling on it

In below example we will how to read the light intensity using LDR and arduino uno and print the data on serial monitor

5V to terminal-1 of LDR
Terminal-2 LDR to 220 ohm resistor terminal -1
From the junction of LDR T2 to resistor T1 to Arduino uno pin A0
Resistor terminal 2- GND

For code click here:

As you can see that as light intensity changes the value printed on the serial monitor changes between 1 to 310

IoT for Juniors – Project 10: Controlling home appliances using web and mobile app (Prev Lesson)

No Comments

Give a comment

Course Curriculum