Git Product home page Git Product logo

shiftyeyesglasses's Introduction

ShiftyEyesGlasses

Adaptation of the 'roboface' animation for the Adafruit IS31FL3741 LED Glasses.

I borrowed the concept and a good bit of code from the 'roboface' example in the Adafruit LED backpack library (https://github.com/adafruit/Adafruit_LED_Backpack/) and adapted it to the nifty LED Glasses by Adafruit (https://www.adafruit.com/product/5210). I used the Adafruit nRF52840 LED Glasses Driver (https://www.adafruit.com/product/5217), but this code should work on most microcontrollers with little or no adjustment (though on slower microcontrollers you may want to increase the animation interval until the animation is smooth).

For the pupil animation, I'm borrowing the logic from the classic 'roboface' Adafruit LED backpack sample. For the blinking, the basic idea is to split up the ring pixels into "rows" that more easily correspond to the matrix rows. When blinking, we move the "eyelids" down by drawing the top "row" of the eye down over time on both the ring and the matrix pixels (drawing the ring pixels last to handle the overlapping pixel), clearing the pixels above the eyelid, and drawing the same color as the ring color to represent the eyelid. This has the effect of drawing over the pupil, causing it to be obscured.

shiftyeyesglasses's People

Contributors

apendley avatar

Stargazers

Joseph Richardson avatar Timothy Harrington avatar Dustin Mollo avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.