Hi All,
I'm attempting to get my new led matrix to work with my arduino. Has anyone got this particular matrix working?
http://www.embeddedadventures.com/LED_matrix_display_LDP-6416.htmlI know how it works, but I'm having trouble looping through the rows. To select a row I need to set pins A, B, C and D to match the row number in binary. IE: row 1 would be D = 0, C = 0, B = 0, A = 1, row 2 would be D = 0, C = 0, B = 1, A = 0 .... row 16 would have all pins set to 1. How would I do this in an elegant way? I would rather not write out this code for each row if I can help it.
digitalWrite(en,HIGH);
digitalWrite(pinA, LOW);
digitalWrite(pinB, LOW);
digitalWrite(pinC, LOW);
digitalWrite(pinD, LOW);
digitalWrite(l,HIGH);
digitalWrite(l,LOW);
digitalWrite(en,LOW);
Im sure there is a super easy way to do this but I'm not experienced enough with the arduino platform to think of a way. Also would this be easier to implement if I skipped writing it in the arduino IDE and went straight to programming it in C?
Thanks
Mark