good evening everyone I want to make a program to light a green and red led with a condition to compare to a threshold on 5 values and I have the following error
Please do not post pictures of code and errors
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
As @UKHeliBob said please post your entire code using code blocks.
It appears that you intended for the digitalWrite() calls that follow the if to be executed if the if condition is true. You did not surround those digitalWrite() calls with curly braces so the compiler assumed you only wanted to execute the first digitalWrite() and then considered the else to have no matching if.
thank you so much the programme work perfectly
This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.