Help with Material with 2D Animation please!!

Hi! I am new to the community, I have a question that I could not answer looking in the forum, I am trying to do some leds with animation like these:

I created the animation in 2d sprite, and I try to join it to the material by function but I do not know how.

Thank you and sorry for my bad english