Other Scanners

The approach used in the Knight Rider sketch allows for lots of variations. Tweaking the brightness function will give various nice effects.

uint8_t brightness(const int8_t led, const int8_t pos) {
	switch (min(abs(led-pos),abs(19-led-pos))) {
		case 0: 	return 32;
		case 1: 	return 16;
		case 2: 	return 6;
		case 3: 	return 2;
		default:	return 1;

Replacing the brightness function as indicated above will give 2 cursors move back and forth.

Another nice effect is achieved with the following brightness function.

uint8_t brightness(const int8_t led, const int8_t pos) {
	int8_t tmp = pos - abs(2*led-19)+2;
	return (tmp>0? tmp+tmp>>1: 0);

It delivers some “glowing” blink effect.


What is the coolest effect you can create? Once you finish playing with these effects go on to the persistence of vision experiments.


2 Responses to Other Scanners

  1. Andrew Lehtola says:

    Is there a program to create the warp core effect in Star Trek The Next Generation? I think it would be similar to the double chaser.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.