0

I am new of using Arduino.

I have seen code for color variables that has uses bool function. Is there anyone who can say me how this function connect to the colors of RGB LED matrix? This code has written for Arduino Due and the RGB LED matrix is 32*32.

// Non-constant variables
// Color variables
bool R [32][32] = {1};
bool G [32][32] = {1};
bool B [32][32] = {1};
  • bool is a data type, not function. you have 3 two dimensionals arrays of booleans. boolean is a datatype for true/false but the size of bool is 8-bit – Juraj Feb 17 at 14:54
  • 1
    Without the rest of the code one can only guess why the original author did what they did. But this appears on the surface as a terrible wast of data space. – st2000 Feb 17 at 14:54
  • 1
    // Non-constant variables .... from this comment line you can tell that the author of the software may not have been thinking clearly – jsotola Feb 17 at 17:39

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.