This senior project aim to detect eyes open or close . If the eyes are closed or opened longer than prescribed .The program will alert to waking up from sleep.In fact, on the road,we could not determine the exact time Whether peoples how long to sleep to be called opiates. the program is designed to give your chosen the time on you need. Whether it is time to alert when symptoms or eyes open to long. The program design for the 2 as separate, there is no case work overlap. From the experiments, we found that light is the main factor to program precision. The program is the most accurate in the light intensity of 300 lux.But when the intensity of the light is changed, the program will gradually decrease performance,until when the light intensity is less than 25 lux or more 2000 lux .The program cant detect . To be detected, it is not good enough.