From: acevest Date: Wed, 3 Dec 2014 14:14:13 +0000 (+0800) Subject: ... X-Git-Url: http://zhaoyanbai.com/repos/%22http:/www.isc.org/icons/zpipe.c?a=commitdiff_plain;h=1a288ec12afaaa815ca9faa3e857b247c00ac3ac;p=acecode.git ... --- diff --git a/arduino/Sensors/Sensors.ino b/arduino/Sensors/Sensors.ino index 1a4db40..5b6791e 100644 --- a/arduino/Sensors/Sensors.ino +++ b/arduino/Sensors/Sensors.ino @@ -18,6 +18,11 @@ void loop() { int hb = analogRead(2); // Human Body + if(hb < 10) + { + hb = 0; + } + digitalWrite(ledPin, hb > 0 ? HIGH : LOW); delay(100);