I’ve been working recently on a very important feature for BlinkStick: being able to play patterns without a connected computer or software running to control the playback. The current design has 16 slots for pattern animations and it’s possible to design quite interesting patterns which are performed at the hardware level. With the new API it will be possible to specify those patterns and start or stop the playback. All patterns are stored to EEPROM.
Each slot can either stop animation, morph to a specific color within a predefined time, set the color and wait for a predefined time or jump to another pattern index. The 0-th pattern is so called “boot animation” pattern: if that pattern is set, then BlinkStick starts playing that pattern when plugged into the computer.
For the example, when BlinkStick is plugged in, it will start playing sequence 0-1-2-1-2-1-2… until it’s stopped. If user requests to play pattern #5, BlinkStick will play pattern 5-6-5-6-5-6… which is short flashes of red. If user requests to play pattern #14, BlinkStick will play pattern 14-15 and then stop.
This feature is currently planned only for BlinkStick v1.1. More details about this when it’s released.
As a side note, I’ve noticed that it’s quite complicated to do multitasking on ATTIny85. The pattern playback has to not interfere with USB communication and ensuring this has been a challenge. I’m currently polishing the firmware and testing to make sure that there is no way to brick the device with messed up pattern sequences.