I created this easy to use library based on blog posts and other videos I found online. You can use it to imitate the MacBook sleep mode LED. I made it to create less distracting status indicators for a little sensor project.
Get the library on GitHub: https://github.com/kslstn/Breathe
If you have questions or ideas for improvement let me know, preferably on GitHub.