So I am working on a small project for school. It consists out of a X-Y table that is controlled by stepper motors and a whole series of buttons & LED's that are used in a quiz. Now I have found some code that I could use perfectly for the quiz part. The code only had 3 buttons & LEDs to press to "play" the quiz so I added 12 more because I need to have it for an entire class of students. For some reason it gives me this error on all the code I added after those first 3.
'b5State' was not declared in this scope
Now, the code is probably a bit sloppy because I'm not that good in coding. But just to explain it in short. b1,b2,b3 are the quiz buttons. b4 is the reset button and b5 - b16 are the other quiz buttons. I've been pulling my hair out trying to figure it out, so any help is highly appreciated!
Mind you, the code for the stepper motors works fine.
Quite apart from the fact that you could do what you want more neatly using arrays, the compiler wasn't lying when it reported that b5State was not declared. Nor are many other variables declared
See this code
uint8 b1State,b2State,b3State,b4State = 0;
It declares 4 variables.
Where is the corresponding declaration for b5State (and others) ?
UKHeliBob:
Quite apart from the fact that you could do what you want more neatly using arrays, the compiler wasn't lying when it reported that b5State was not declared. Nor are many other variables declared
See this code
uint8 b1State,b2State,b3State,b4State = 0;
It declares 4 variables.
Where is the corresponding declaration for b5State (and others) ?
Oh, I actually totally missed to change that part of the code. It works! Thanks!