Posts

Showing posts from May, 2025

DIY Arduino Project: Using LDR (Light Dependent Resistor) to Detect Light Levels

Image
Introduction: In this tutorial, we will learn how to  implement  an LDR (Light Dependent Resistor) with an Arduino to  sense  light levels. The LDR  varies  its resistance  depending  on the amount of light  incident  on it,  and   thus  it  can   be   used   in different  applications  such   as  automatic lighting, light sensors, and  so on ! Components Required: Arduino board (Uno, Nano, etc.) LDR (Light Dependent Resistor) 10k Ohm Resistor Breadboard Jumper wires USB cable for Arduino programming Circuit Diagram: Arduino code int ldrPin = A0; int ldrValue = 0;  void setup() {   Serial.begin(9600);  } void loop() {   ldrValue = analogRead(ldrPin);    Serial.println(ldrValue);    delay(500);  } Circuit Connections (Steps): Step-by-Step Wiring Instructions: Connect one terminal of the LDR to the 3.3 V pin of the Arduino. C...

LED blinking using Arduino

Image
Introduction: Learning  to blink an LED  with  an Arduino is the  " Hello World "  of embedded systems. It ' s  easy ,  enjoyable , and a  great   place   to   start  for  electronics and coding  beginners .   Components Required: Component Quantity Arduino Uno (or any Arduino board) 1 LED (Any color) 1 220-ohm Resistor 1 Breadboard 1 Jumper Wires As needed USB Cable 1 Circuit Diagram: Connection Details: Connect the long leg (anode) of the LED to Arduino pin 13 Connect the short leg (cathode) to one end of the 220-ohm resistor Connect the other end of the resistor to GND (Ground) Arduino code: void setup() {   pinMode(3, OUTPUT);  } void loop() {   digitalWrite(3, HIGH);   delay(1000);              digitalWrite(3, LOW);     delay(1000);             } How It Works: ...