5% OFF Over $19, Code: Elephant5; 10% OFF Over $59, Code: Elephant10



ARDUBLOCK Project 19: Human Body IR Pyroelectricity

Posted by Fiona Su on

Introduction:
It is a human body detecting sensor based on infrared pyroelectricity, which can only detect moving body. That is to say, when you don’t move, it can do nothing. Still, it is a digital sensor.
In this project, we use graphical programming and regard human body IR pyroelectricity and human body as a button to control the on and off of LED.
Materials Required:

  • 1. KEYESTUDIO UNO Control Board *1
  • 2. V5 Sensor Shield*1
  • 3. Piranha LED*1
  • 4. Human Body IR Pyroelectricity*1
  • 5. Female to Female Dupont Line*6

Connection Diagram:

thumb

thumb

After wiring, we can start programming.

thumb

Click “download to Arduino” to see the following codes in IDE interface:
Sample Code:

*****************************************************************************
void setup()
{
  pinMode( 3 , INPUT);
  Serial.begin(9600);
  pinMode( 6 , OUTPUT);
}

void loop()
{
  if (( digitalRead(3) && HIGH ))
  {
    Serial.print("Somebody is in this area!");
    Serial.println();
    digitalWrite( 6 , LOW );
    delay( 1000 );
  }
  else
  {
    Serial.print("No one!");
    Serial.println();
    digitalWrite( 6 , HIGH );
    delay( 1000 );
  }
}
*******************************************************************************

Result:
After the downloading is done, use reed switch module to check whether there is someone moving. If someone moving, piranha LED on and the serial monitor indicates “Somebody is in this area!”; if nobody moving, the LED off and the serial monitor indicates "No one!".

thumb

All Projects

Buy it >> ARDUBLOCK Graphical Programming Starter Kit for Arduino

 

0 comments

Leave a comment

Please note, comments must be approved before they are published