Answers for "How to draw patter using LED Matrix""

0

How to draw patter using LED Matrix"

uint8_t column_pins[4] = { 2, 3, 4, 5 };
uint8_t row_pins[4]    = { 11, 10, 9, 8 };

static void init(void) {

    /* Turn all columns off by setting then low. */
    for (uint8_t x=0; x<4; x++) {
        pin_mode(column_pins[x], OUTPUT);
        digital_write(column_pins[x], LOW);
    }

    /* Turn all rows off by setting then high. */
    for (uint8_t y=0; y<4; y++) {
        pin_mode(row_pins[y], OUTPUT);
        digital_write(row_pins[y], HIGH);
    }
}
Posted by: Guest on April-21-2021

Code answers related to "How to draw patter using LED Matrix""

Browse Popular Code Answers by Language