urbanspaceman
Well-known member
Hi, i'm stuck with a (maybe) simple problem
i have a sketch like this (simplified version)
i have a problem passing the array to the function
i have a sketch like this (simplified version)
Code:
void myfunction(int lenght, uint16_t x, uint16_t y, uint16_t s, char t_name, uint16_t color, int myarray[]) {
for (int i = 0; i < 16; i++) {
if(myarray[i] == 1){
//do something
}else{
if (lenght < i + 1) {
//do another thing
} else {
//or another
}
}
}
}
void setup() {
// put your setup code here, to run once:
}
void loop() {
// put your main code here, to run repeatedly:
int my_array = {1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0};
Myfunction(14, 30, 60, 18, 'A', ILI9341_ORANGE, my_array);
}
i have a problem passing the array to the function