Multiple LED's on separate pins, switches and functions - need guidance

PaulRB:
Chris, that sketch doesn't compile:

HolidayV.cpp: In function ‘void turnLeft()’:

HolidayV.cpp:82:5: error: expected ‘;’ before ‘buttonstate’
HolidayV.cpp: In function ‘void turnRight()’:
HolidayV.cpp:106:5: error: expected ‘;’ before ‘button_state’
HolidayV.cpp: In function ‘void brakelights()’:
HolidayV.cpp:127:5: error: expected ‘;’ before ‘button_state’




The problem seems to be the word "loop" after the end of each of your 3 while statements in turnLeft(), turnRight() and brakelights(). That's not valid C/C++. It compiles OK if you remove those "loop" words.

Post the one you had working.

Originally, I compiled, loaded, tested, copied, and pasted to page 3. When I reposted, I was at work and simply quoted my original post from the previous page, so there shouldn't be any reason why it wouldn't work.