Last active
December 17, 2015 18:09
-
-
Save tonussi/5651435 to your computer and use it in GitHub Desktop.
Testando Sensor de Presença
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
int pinoSensorPIR = 7; | |
int bRate = 9600; | |
void setup() { | |
pinMode(pinoSensorPIR, INPUT); | |
Serial.begin(bRate); | |
} | |
void loop() { | |
Serial.println(!digitalRead(pinoSensorPIR)); | |
//0 nada detectado | |
//1 algo detectado | |
delay(500); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment