usually code shall be posted as code-section
in this case I make an exception to make visible what
pressing Ctrl-T does
without any formatting and correction Your code just copy & pasted into the Arduino-IDE
Do you see the added big red line ? All the if-statements are aligned to the first columm.
Even after pressing Ctrl-T.
Ctrl-T does auto-format your code with indentions.
The indentions show the nesting-level more indention more nested
But the autoformat does NOT create indentions. This is a
very clear signal
that something is wrong with opening / closing parenthesises
" ( " / " ) "
and
with opening / closing curly brackets
" { " / "} "
Now after correction and pressing Ctrl-T the indentions look like this.
Do you see that all the if-statements are aligned to the
third-columm
as the big red line shows
You have to go through your code and check if all curly brackets at the beginning are
opening "{" and you have to check if all opening curly brackets have a closing curly bracket "}"
You have to check if all opening parenthesis "(" have a closing parenthesis ")"
best regards Stefan

