This repo contains the firmware source for the EOG detection and lucid dream induction device I build back in mid 2016. Check out this article for more information.
I've hosted it on GitHub now to make it easier to share the code, but please note that the code is not intended to be anything more than a reference for similar projects. The code is quite messy, but the overall idea is quite simple and it is heavily commented. If you would like to compile it, you are on your own...