March Madness - Rotate LEDS

Continuing with the debugging theme I built a proto board with 12 LEDs on it, one connected to each Digital I/O pin. This little program just cycles through all of the I/O pints turning them on. The intent is to use it when debugging other hardware to see what is going on.

BTW, these leds are left over from the late 80's and early 90's when I used to do hardware. The same part number is STILL AVAILABLE DIALIGHT 555-4003

//***************************************************************************
//*	March Madness 3/24
//*	blink all of the leds
//***************************************************************************


int	gPinNumber;

//***************************************************************************
void	setup()
{

	gPinNumber	=	0;
	
	
}

#define	kDELAYtime	100

//***************************************************************************
void	loop()
{
	pinMode(gPinNumber, OUTPUT);
	digitalWrite(gPinNumber, HIGH);
	delay(kDELAYtime);
	digitalWrite(gPinNumber, LOW);
	
	gPinNumber++;
	
	if (gPinNumber > 13)
	{
		gPinNumber	=	0;
	}
}