Im learning to work with arduino/C in school, im enjoying it very much but im still kinda new.
Now for our final project, we have to make something that requires multiple statemachines. Now i run into the following problem:
For every statemachine i want to make a Tab, but in the statemachines things get triggered by states of other statemachines. If i try to check (for example) Trafficlight1_State = TRAFFICLIGHT1_STATE_STOP, i get the message 'TRAFFICLIGHT1_STATE_STOP' Declared out of scope. This is because it is in a tab to the right.
For some reason arduino's compiler can't see tabs to the right. As statemachines in my program are quite dependant on eachother, its not possible to make one order that solves all the compiling problems.
What options do i have to solve this?
One possibility i thought of, was declaring the different states of the statemachines in 1 big tab at the start. This would be quite ugly though, and not very structured.