anshulpareek
Published © GPL3+

DIY PC's Auto Sleep Mode Sensor

Convert PIR into DIY PC's Auto Sleep mode sensor using Arduino which feels your presence & makes your PC go to or wake up from Sleep mode.

BeginnerFull instructions provided1 hour6,208
DIY PC's Auto Sleep Mode Sensor

Things used in this project

Story

Read more

Custom parts and enclosures

Windows PROCESSING EXECUTABLE FILE

Please unzip this file and run by clicking on file in zip folder. This is a executable file which is having processing code to sleep and awake your pc. only for windows 64 bit version.

MAC OSX Processing executable file.

Please unzip this file and run the executable file by clicking on file. This file will work only for mac users.

Schematics

PIR SENSOR AND ARDUINO CONNECTIONS

Connect pir sensor as given in diagram

Code

Arduino Code

Arduino
Copy and paste this arduino code
#define pirPin 8

void setup() {
   Serial.begin(9600);
   pinMode(pirPin, INPUT);

}

void loop() {
  
   PIRSensor();
   delay(200);
}

void PIRSensor() {
  
   if(digitalRead(pirPin) == HIGH) {
    Serial.println(1);
   }else{
    Serial.println(0);
   }
}

Credits

anshulpareek

anshulpareek

14 projects • 93 followers
Working as a IOT And Sr. Software Engineer having interest in developing gadgets for general purpose.

Comments