Free Shipping in Canada on Orders Over $50!

HC-SR501 Infrared Sensor Module

  • $6.47
  • Save $3.48

Only 4 left!

Infrared Sensor Module Code


//Henry's Bench
// HC-SR501 Motion Detector
// Sample Sketch
 
int ledPin = 13;  // LED on Pin 13 of Arduino
int pirPin = 7; // Input for HC-S501
int pirValue; // Place to store read PIR Value

void setup() {
  pinMode(ledPin, OUTPUT);
  pinMode(pirPin, INPUT);
  digitalWrite(ledPin, LOW); 
}

void loop() {
  pirValue = digitalRead(pirPin);
  digitalWrite(ledPin, pirValue);
}

We Also Recommend


where to buy infrared sensor in canada

infrared sensor canada

buy infrared sensor canada