I will use ir led emitter/receiver for detecting rem phases, the ir led shines on eyelid and the phototransistor will detect if the eye is moving like we are in rem ... but i don't know how to write the code to make me sure that my device has detected rem phase.
So we need to:
1.) read from the sensor with eye opened and hold viewing the sensor
2.) read from the sensor with eye opened and moving it
3.) read from the sensor with eyelid closed
all of these values will be stored in variables.
but when i wiil check if we are in rem phase i don't know how to proceed...with a simple if it doesn't work...too much false positive.
Any suggestions?
THX.