Hi Guys.............. I am having a problem which shows like error: expected unqualified-id before 'if'. here is my code :
int LED1 = 2;
int LED2 = 3;
int LED3 = 4;
int LED4 = 5;
int LED5 = 6;
int LED6 = 7;
int LED7 = 8;
int LED10 = 11;
int LED11 = 12;
const int trigPin = 9;
const int echoPin = 10;
int t = 70;
if (distance = 5cm or > 5cm) { ................................................................//here the code gets error
Your topic has been moved to a more suitable location on the forum.
Please edit your post, select all code and click the </> button to apply so-called code tags and next save your post. It makes it easier to read, easier to copy and the forum software will display it correctly.