Thank you for responding to my Problems, First of all this is my second time writing this post letter in this forum. I know now to save anything I write to anyone. I should have saved it as a doc. or txt. File before sending it. You just can’t Pre-view it before sending it, so that the Arduino web site can’t lose it or drop out on me (lost in La’ La’ Land somewhere????).
Anyway what I would like to do is get my Arduino Uno Rev 3 to do the following:
I want to set up 20 different Patterns using my remote to control 20 Buttons to switch different Patterns
On my Led Matrix 6X6 dot display 6=Rows X 6=Cols.
I have 20 sketches that are all the same except for the String codes are different.
I have the IRremote control sketch working with my Hex codes for the 20 buttons to be used.
// Example sketch Name: Shift_Bowtie (Pattern #1)
// Note: using (2) 74HC595’s to control Rows & Columns.
int SER = 8;
int LATCH = 9;
int CLK =10;
int interval = 0; //how many millis to cycle between numbers
int firstdigit = 0; //integers to hold individual digit values
int seconddigit = 0;
//sequence of 0-10
int sequence[10] = {0, 97, 225, 30, 12, 0, 18, 18, 0};
//for diff. Patterns change numbers sequence .
void showvalues(int one, int two) //function to display values
{
unsigned long currentmillis = millis(); //store current millis
do {
digitalWrite(LATCH, LOW);
shiftOut(SER, CLK, MSBFIRST, sequence[one]);
digitalWrite(LATCH, HIGH);
unsigned long int x = millis() - currentmillis;
} while ((millis()-currentmillis) < interval);
}
void setup() {
Serial.begin(9600); //start serial if needed
pinMode(SER, OUTPUT);
pinMode(LATCH, OUTPUT);
pinMode(CLK, OUTPUT); }
void loop() {
for (int i = 0; i < 999; i++) {
int b = i;
firstdigit = b % 10;
b = b/10;
seconddigit = b % 10;
showvalues(firstdigit, seconddigit);
}
}