An electronic device for pupillary measurement