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
The following code produces the error "'HSBtoRGB' was not declared in this scope". This appears to only happen in a OS X environment. This error occurs in 1.6.7, haven't tested it any other version of the Arduino IDE. The code will work if you remove the newline from the parameter list in the Function declaration.
int r,g,b,hue,brightness,saturation;
void setup() {
// put your setup code here, to run once:
Serial.begin(9600);
}
void loop() {
// put your main code here, to run repeatedly:
hue = 180;
brightness = 255;
saturation = 55;
HSBtoRGB(hue, saturation, brightness, &r, &g, &b);
Serial.print(" hue=");
Serial.print(hue);
Serial.print(" saturation=");
Serial.print(saturation);
Serial.print(" brightness=");
Serial.print(brightness);
Serial.print(" red=");
Serial.print(r);
Serial.print(" green=");
Serial.print(g);
Serial.print(" blue=");
Serial.print(b);
Serial.println("");
delay(500);
}
void HSBtoRGB(int inHue, int inSaturation,
int inBrightness, int *oR, int *oG, int *oB ) {
*oR = inHue;
*oG = inSaturation;
*oB = inBrightness;
}
The text was updated successfully, but these errors were encountered:
I get the same error with Arduino IDE 1.6.7 and 1.6.8 on Windows 7 so I don't think it's OSX specific. The code compiles without error for me using the hourly build.
The following code produces the error "'HSBtoRGB' was not declared in this scope". This appears to only happen in a OS X environment. This error occurs in 1.6.7, haven't tested it any other version of the Arduino IDE. The code will work if you remove the newline from the parameter list in the Function declaration.
The text was updated successfully, but these errors were encountered: