HC-SR501  

 

VCC→5V

OUT→2

GND→GND

LED→13,GND

 

void setup(){
 pinMode(13,OUTPUT);
 pinMode(2,INPUT);
}

void loop(){
 digitalWrite(13,digitalRead(2));
}
arrow
arrow
    全站熱搜

    xxxhuj 發表在 痞客邦 留言(1) 人氣()