Simple Arduino Projects with PIR Sensors for Kids

Simple Arduino Projects with PIR Sensors for Kids

Overview

This project tells about how to use a PIR sensor to glow an LED this is very useful to detect the presence of living beings.

In this project when there is any living being present near the range of the PIR sensor the LED will glow in the rest of the cases Led will be Off.

Hardware required 

  1. Arduino Uno R3
  2. LED
  3. Resistor
  4. Jumper Wires
  5. PIR Sensor

Schematic Diagram

Fig 1.  Circuit Diagram

Arduino Code : 

int led = 2;
int sensor = 13;

void setup() {
  pinMode(led, OUTPUT);
  pinMode(sensor, INPUT);
  Serial.begin(9600);
}

void loop() {
  int sensorval = digitalRead(sensor);
  Serial.println(sensorval);
  
  if (sensorval == HIGH) {
    digitalWrite(led, HIGH);
  }
  else {
    digitalWrite(led, LOW);
  }
}

Precautions

  1. Connections should be done properly.
  2. Arduino is case Sensitive so code accordingly.
  3. Give different and appropriate colors to the wires.
  4. Use resistors for sensors and LED’s.

More Posts

Coding For kids

Coding Courses for Kids Online

Our courses which are tailored for grades 1 to 12, and our hands-on curriculum seamlessly integrates, preparing students for challenges and inspiring the next generation.

Leave a Reply

Coding For kids

Coding Courses for Kids Online

Our courses which are tailored for grades 1 to 12, and our hands-on curriculum seamlessly integrates, preparing students for challenges and inspiring the next generation.

STEM Labs

STEM LAB for Schools

Looking for a cutting-edge makerspace that goes beyond traditional education? Partner with Makers’ Muse to unlock innovation and transformative learning for your students.

Coding Toys

STEM LAB for Schools

Discover a revolutionary coding journey for students with our cutting-edge educational toys. Partner with us to unlock innovative learning experiences that transcend traditional education.

Do you have questions regarding our STEM program?

Send Us A Message