You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I tried to Copy your Application, but I get the following Error message.
The Arduino Code can't upload to my UNO.
its saying "colour" is not declared
See the following.
thank you in advance
Andreas
Arduino: 1.8.7 (Mac OS X), Board: "Arduino/Genuino Uno"
homekit_arduino:77:24: error: expected ',' or '...' before 'colors'
void changeColor(int[3]colors, int[3]prevColors){
^
/Users/arv001/Desktop/homekit_arduino/homekit_arduino.ino: In function 'void loop()':
homekit_arduino:59:8: error: expected unqualified-id before '[' token
int[3] prevColors = [rPrev, gPrev, bPrev]; //array with previous color values
^
homekit_arduino:65:8: error: expected unqualified-id before '[' token
int[3] colors = [r,g,b]; //array with color values
^
homekit_arduino:71:17: error: 'colors' was not declared in this scope
changeColor(colors, prevColors);
^
homekit_arduino:71:25: error: 'prevColors' was not declared in this scope
changeColor(colors, prevColors);
^
/Users/arv001/Desktop/homekit_arduino/homekit_arduino.ino: At global scope:
homekit_arduino:77:24: error: expected ',' or '...' before 'colors'
void changeColor(int[3]colors, int[3]prevColors){
^
/Users/arv001/Desktop/homekit_arduino/homekit_arduino.ino: In function 'void changeColor(int*)':
homekit_arduino:79:15: error: 'colors' was not declared in this scope
int diffR = colors[0]-prevColors[0];
^
homekit_arduino:79:25: error: 'prevColors' was not declared in this scope
int diffR = colors[0]-prevColors[0];
^
exit status 1
expected ',' or '...' before 'colors'
The text was updated successfully, but these errors were encountered:
Hello,
I tried to Copy your Application, but I get the following Error message.
The Arduino Code can't upload to my UNO.
its saying "colour" is not declared
See the following.
thank you in advance
Andreas
Arduino: 1.8.7 (Mac OS X), Board: "Arduino/Genuino Uno"
homekit_arduino:77:24: error: expected ',' or '...' before 'colors'
void changeColor(int[3]colors, int[3]prevColors){
^
/Users/arv001/Desktop/homekit_arduino/homekit_arduino.ino: In function 'void loop()':
homekit_arduino:59:8: error: expected unqualified-id before '[' token
int[3] prevColors = [rPrev, gPrev, bPrev]; //array with previous color values
^
homekit_arduino:65:8: error: expected unqualified-id before '[' token
int[3] colors = [r,g,b]; //array with color values
^
homekit_arduino:71:17: error: 'colors' was not declared in this scope
changeColor(colors, prevColors);
^
homekit_arduino:71:25: error: 'prevColors' was not declared in this scope
changeColor(colors, prevColors);
^
/Users/arv001/Desktop/homekit_arduino/homekit_arduino.ino: At global scope:
homekit_arduino:77:24: error: expected ',' or '...' before 'colors'
void changeColor(int[3]colors, int[3]prevColors){
^
/Users/arv001/Desktop/homekit_arduino/homekit_arduino.ino: In function 'void changeColor(int*)':
homekit_arduino:79:15: error: 'colors' was not declared in this scope
int diffR = colors[0]-prevColors[0];
^
homekit_arduino:79:25: error: 'prevColors' was not declared in this scope
int diffR = colors[0]-prevColors[0];
^
exit status 1
expected ',' or '...' before 'colors'
The text was updated successfully, but these errors were encountered: