Weruiopfmniovmroiz

This has been deleted.

I guess it is not necessary to provide the actual error message in order to discover the cause?
Paul

You really need to learn WHERE curly braces need to be used. You can’t just sprinkle them throughout the code at random. You are missing several where they need to be, and have extras where they have no business being. Look at some simple examples, and learn where to put them.

Read the forum guidelines. to see how to properly post code.

Use the IDE autoformat tool (ctrl-t or Tools, Auto format) before posting code in code tags.

Just using the autoformat tool on your code shows where the extra curly brackets are. (2 at the very end of the code listing).

Fix those and then the error is undeclared variables BIN1, BIN2, PWMB.

Fix those problems and the code compiles.

Why is it then visible?