Eyeblink Digital Sensor
Rs. 109.00 Rs. 120.00
- Product Code: SEN-EYE
- SKU -
- Availability: In Stock
- Price in reward points: 2
- For Bulk Order 9962060070
Quick support on WhatsApp (+919962060070) only between morning 11am-4pm, no call will be answered
SPECIFICATIONS:
-Initially 5V power supply is given to the sensor.
-Connect ground pin.
-Wear the eye blink sensor glass on the face at a particular distance.
-We can view the LED blinking for each eye blink; LED blinks for a closed eye and doesn’t blink when eye is open.
-The output pin gives to the digital output.
OVERVIEW:
-Focus of technology
-System Capabilities
-Power supply voltage : 3.3V-5V
-No additional power supply
-3.5mm Connector
-Operating current: 100mA
PACKAGE INCLUDES:
1 PCS x Eyeblink Digital Sensor
//SOURCE CODE TAKEN FROM BELOW LINK
//https://forum.arduino.cc/index.php?topic=202877.15
/*
Most of this code was cribbed directly from
from Nick Gammon's "Debounce without delay" code
on his switch tutorial at
http://www.gammon.com.au/forum/?id=11955
*/
const byte blinkPin = 12; // change this to fit your circuit
byte oldBlinkState = HIGH; // assume eye open (or supply init/calibrate routine)
const unsigned long debounceTime = 10; // milliseconds
unsigned long blinkStartAt; // when the blink started
unsigned long oldBlinkStartAt; // when the previous blink started
unsigned long unBlinkStartAt; // when blink ended
unsigned long tweenTime; // time since last blink
unsigned long blinkTime;
unsigned long blinkChange;
void setup ()
{
Serial.begin (115200);
pinMode (blinkPin, INPUT_PULLUP);
} // end of setup
void loop ()
{
byte blinkState = digitalRead (blinkPin);
if (blinkState != oldBlinkState)
{
if (millis () - blinkChange >= debounceTime)
{
blinkChange = millis (); // when blink state changed
oldBlinkState = blinkState; // remember for next time
if (blinkState == LOW) { // change to LOW if your sensor is LOW when blinking
blinkStartAt = blinkChange;
tweenTime = blinkChange - oldBlinkStartAt;
oldBlinkStartAt = blinkStartAt;
Serial.print ("Blink at: ");
Serial.print (blinkStartAt);
Serial.print (" Time since last blink: ");
Serial.println (tweenTime) ;
} // end if switchState is LOW
else {
unBlinkStartAt = blinkChange;
Serial.print ("UnBlink at: ");
Serial.print (unBlinkStartAt);
Serial.print (" Blink length: ");
Serial.println (unBlinkStartAt - blinkStartAt);
} // end if blinkState is HIGH
} // end if debounce time up
} // end of state change
// other code here ...
} // end of loop
15 days