What's wrong with this as the picture shown?

Hi everyone,
The sketch compiling and stuck here, how to fix please.
Thanks
Adam

stk

Help us help you.

Please follow the advice given in the link below when posting code, in particular the section entitled 'Posting code and common code problems'

Use code tags (the </> icon above the compose window) to make it easier to read and copy for examination

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

Include the entire error message. It is easy to do. There is a button (lower right of the IDE window) called "copy error message". Copy the error and paste into a post in code tags. Paraphrasing the error message leaves out important information.

Post a schematic.

Post an image of your project.

Which Micro Controller are you using?

Is this simulator code?

Please describe the problem better then you just did.

It looks like the digitalRead is outside of a function. Mind your curly brackets. Autoformat (ctrl-t or Tools, Auto format) may help you find missing or misplaced brackets.

I know that you did not read the how to get the best from our forum post because you posted worthless screen shot instead of posting the code properly. Please read the forum guidelines to see how to properly post code and some information on making a good post.

It is easier to help you if you read and follow the guidelines.

No, if you scroll up and put your cursor on the closing brace, it matches the ope

oh, wait, never mind.

a7

1 Like

It’s digitalWrite and it is not outside. OPs problem is the stuck compilation as I understood

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.