The arduino code is shown in below.
========================================================================
/* PIR sensor tester*/

int ledPin = 2; // choose the pin for the LED
int inputPin = 3; // choose the input pin (for PIR sensor)
int pirState = LOW; // we start, assuming no motion detected
int val = 0; // variable for reading the pin status

void setup() {
pinMode(ledPin, OUTPUT); // declare LED as output
pinMode(inputPin, INPUT); // declare sensor as input

Serial.begin(9600);
}

void loop(){
val = digitalRead(inputPin); // read input value
if (val == HIGH) { // check if the input is HIGH
digitalWrite(ledPin, HIGH); // turn LED ON
if (pirState == LOW) {
// we have just turned on
Serial.println("Motion detected!");
// We only want to print on the output change, not state
pirState = HIGH;
}
} else {
digitalWrite(ledPin, LOW); // turn LED OFF
if (pirState == HIGH){
// we have just turned of
Serial.println("Motion ended!");
// We only want to print on the output change, not state
pirState = LOW;
}
}
}

========================================================================

The video demo is shown in below.











Today I'm going to show you how  Arduino interfacing with Visual studio to read temperature.
If you don’t know to start visual studio program click here



Today I'm going to show you how to change brightness & contrast of an image using OpenCv.


Today I'm going to show you how to assessing the pixel values of an image using OpenCv.



Today I'm going to show you how to create graphical interface for Arduino (Using visual studio C#)

Hello everyone! Today I'm going to show you how to install rasbian OS into a micro SD card.

Today I'm going to show you how to convert an image color using OpenCv.

Today I'm going to discuss about Depth, Number of Channels & Type of Image





Let’s learn about data types and variables used in java.

Now you can easily get us with our newly updated android app.


Today I'm going to show you how to create image using OpenCv.




Today I'm going to show you how to develop python using visual studio

Today I'm going to show you how to install python in windows.


Today I'm going to show you how to display an image using opencv.


This tutorial is about another widely used high level programming language, Python.

Now you can see tutorials without browsing. Install our android app to keep in touch with us.


Social