Arduino beginner

analogread != analogRead

Your "while" condition needs a rework.

If you'd tried the auto-format tool in the IDE before you posted your code (hint), it would have told you part of the problem with your code.

Edit: I took a longer look through.
It looks like you've got some pretty major misconceptions about how things work in C (e.g. "constrain" must be called every time you want to constrain a value; it doesn't automagically bind to a variable and operate on it whenever you reference that value).
When I said earlier to iterate through an array of pin numbers, I didn't mean to set up a for loop, then execute the exact same code for each of the array members explicity - that's why we have for loops.
Your "do..while" looks like you don't understand how to combine conditions, and doesn't make any sense.

Here,      for(angle = 0; angle < 180; angle += 1) // goes from 0 degrees to 180 degree the code does not match the comment. This is no big deal, because the compiler ignores the comment, but it is best to try to get the comment to describe the action, or you may as well miss it out altogether.

I'd recommend you take a few days going through some tutorial and examples, and working through them.