JustPaste
HomeCategoriesAboutDonateContactTerms of UsePrivacy Policy
JustPaste

Free online notepad — write and share instantly

Navigate

  • Home
  • Timeline
  • Categories

Info

  • About
  • Donate
  • Contact

Legal

  • Terms of Use
  • Privacy Policy

© 2026 JustPaste.app. All rights reserved.

Made with ♥ by JustPaste

motion | JustPaste.app
5 months ago27 views

motion

int pirPin = 2;

int motionState = 0;

void setup(){

pinMode(pirPin,INPUT);

Serial.begin(9600);

}

void loop(){

motionState = digitalRead(pirPin);

if(motionState == HIGH){

Serial.println("Motion Detected");

}

else{

Serial.println("No motion Detected");

}

}

← Back to timeline