|
Code
#include <conio.h>
#include <stdio.h>
#include <stdlib.h>
int main()
{
int leds[9] = {0,1,2,4,8,16,32,64,128};
int i;
for(i=0;i<9;i++)
{
_outp(0x378,leds[i]);
_sleep(1000);
}
return 0;
}
Description
This example stores
all the values to be outputted in
an array . We then loop through the
array .
Download
walkingledsup.txt
|