I am in a Mac with ElCapitan operating system.
I get the following error:
Keyboard_Instrument.ino:3:17: error: array must be initialized with a brace-enclosed initializer.
[code][code]
int buttons[6];
// set up an array with 6 integers
int button[0] = 2;
// give the first element of the array the value 2
int notes[] = {262,294,330,349};
void setup() {
// put your setup code here, to run once:
Serial.begin(9600);
}
void loop() {
// put your main code here, to run repeatedly:
int keyVal = analogRead(A0);
Serial.println(keyVal);
if(keyVal == 1023){
tone(8, notes[0]);
}
else if(keyVal >= 990 && keyVal <= 1010){
tone(8, notes[1]);
}
else if(keyVal >= 505 && keyVal <= 515){
tone(8, notes[2]);
}
else if(keyVal >= 5 && keyVal <= 10){ (This is line Number 17)cbcademd
tone(8, notes[3]);
}
else{
noTone(8);
}
}
/code]