This program is a development of previous post. This uses the table as a data storage pattern of the LED and the constant of the delay.
To save the patterns and the delay led to use of variables and dataDelay dataFlasher as a array of byte and integer. This table will be placed in the microcontroller program code permanently.
DataFlasher variable is a data sequence of LED patterns, written in binary format for ease verification of the pattern. While the variable of dataDelay is a data constants of each led patterns as passing parameter for the function of delay(). As dummy load, on the end of data of dataDelay variable is set as null. This is for mark that no data after it.
Inside the function of loop() get any data for led pattern, which is in dataFlasher variables to be sent to each bit of LED (D2 to D9). On line 49 is masking of lsb of current dataFlasher and sent to led with d variabel as channel of digital port. Next on line 50, variable of i to be right shifted for the next bit.
The next data is taken, until dataDelay = 0.
Source can be downloaded here
Last updated byat .