I am trying to assign these 9 variables in the array a value equal to what I type into the serial port one at a time.
However, I am getting the error message "lvalue required as left operand of assignment" for the bottom line of code.
int eventTimes [9] = {shour, smin, ssec, bhour, bmin, bsec, rhour, rmin, rsec};
for (int in = 0 ; in < 9 ; in++){
while (!Serial.available()) {
//wait for a the user to enter a value
;
}
(int) eventTimes[in] = Serial.parseInt();}
Is it just a limitation with the language, or am I making a mistake?
This is my first time using for-loops and arrays and any advice would be helpful.