int ledpin=13;
int mspin=2;
int pirstate=LOW;
int val=0;
void setup() {
// put your setup code here, to run once:
pinMode(ledpin, OUTPUT);
pinMode(mspin,INPUT);
}
void loop() {
// put your main code here, to run repeatedly:
val = digitalRead(mspin);
if
(val==HIGH){
digitalWrite(ledpin, HIGH);}
else
{digitalWrite(ledpin,LOW);}
}