Guten Tag,
Ich bin dabei die Möglichkeiten des RGB-Moduls VMA307 zu testen.
Ich habe das Programm gemäss Anleitung eingegeben, aber leider ist in der letzten Zeile im Setup loop ein Fehler: setColor (RGBdigital1, YELLOW); wird nicht akzeptiert!!
Was mache ich falsch?
wo kann ich nach lesen, wie der Command richtig heissen sollte?
Kann mir jemand helfen, das wäre super.
danke und Gruss Walter 13
Hier mein Programm:
int RGBdigital1[] = {34, 35, 36};
const boolean ON = HIGH;
const boolean OFF = LOW;
const boolean RED[] = {ON, OFF, OFF};
const boolean GREEN[] = {OFF, ON, OFF};
const boolean BLUE[] = {OFF, OFF, ON};
const boolean YELLOW[] = {ON, ON, OFF};
const boolean CYAN[] = {OFF, ON, ON};
const boolean MANGENTA[] = {ON, OFF, ON};
const boolean WHITE[] = {ON, ON, ON};
const boolean BLACK[] = {OFF, OFF, OFF};
const boolean* COLORS[] = {RED, GREEN, BLUE, YELLOW, CYAN, MANGENTA, WHITE, BLACK};
void setup() {
for (int i=0; i<3; i++){
pinMode(RGBdigital1[i], OUTPUT);
}
}
void loop() {
setColor(RGBdigital1, YELLOW);
}
Diese Fehlermeldung habe ich erhalten:
Arduino: 1.8.5 (Mac OS X), Board: "Arduino/Genuino Mega or Mega 2560, ATmega2560 (Mega 2560)"
/Users/Walter/Documents/Arduino/RGB/RGB.ino: In function 'void loop()':
RGB:41: error: 'setColor' was not declared in this scope
setColor(RGBdigital1, YELLOW);
^
exit status 1
'setColor' was not declared in this scope