Hi i am new to this, I am having a problem with my code or something, but when I upload my code in the Arduino Uno, it shows this error messsage:
Arduino: 1.8.18 (Windows 10), Board: "Arduino Uno"
In file included from sketch\wall_follower.ino.cpp:1:0:
C:\Users\siya2\Desktop\siya_Drive\Personal\learning outside school\Arduino\wall_follower\wall_follower.ino: In function 'void loop()':
C:\Users\siya2\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.8.6\cores\arduino/Arduino.h:40:14: error: lvalue required as left operand of assignment
#define HIGH 0x1
^
C:\Users\siya2\Desktop\siya_Drive\Personal\learning outside school\Arduino\wall_follower\wall_follower.ino:41:38: note: in expansion of macro 'HIGH'
if (rs = HIGH && ls = HIGH && cs = HIGH){
^~~~
C:\Users\siya2\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.8.6\cores\arduino/Arduino.h:41:14: error: lvalue required as left operand of assignment
#define LOW 0x0
^
C:\Users\siya2\Desktop\siya_Drive\Personal\learning outside school\Arduino\wall_follower\wall_follower.ino:44:43: note: in expansion of macro 'LOW'
else if (rs = HIGH && ls = HIGH && cs = LOW){
^~~
C:\Users\siya2\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.8.6\cores\arduino/Arduino.h:40:14: error: lvalue required as left operand of assignment
#define HIGH 0x1
^
C:\Users\siya2\Desktop\siya_Drive\Personal\learning outside school\Arduino\wall_follower\wall_follower.ino:50:42: note: in expansion of macro 'HIGH'
else if (rs = HIGH && ls = LOW && cs = HIGH){
^~~~
C:\Users\siya2\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.8.6\cores\arduino/Arduino.h:41:14: error: lvalue required as left operand of assignment
#define LOW 0x0
^
C:\Users\siya2\Desktop\siya_Drive\Personal\learning outside school\Arduino\wall_follower\wall_follower.ino:58:42: note: in expansion of macro 'LOW'
else if (rs = HIGH && ls = LOW && cs = LOW){
^~~
C:\Users\siya2\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.8.6\cores\arduino/Arduino.h:40:14: error: lvalue required as left operand of assignment
#define HIGH 0x1
^
C:\Users\siya2\Desktop\siya_Drive\Personal\learning outside school\Arduino\wall_follower\wall_follower.ino:62:42: note: in expansion of macro 'HIGH'
else if (rs = LOW && ls = HIGH && cs = HIGH){
^~~~
C:\Users\siya2\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.8.6\cores\arduino/Arduino.h:41:14: error: lvalue required as left operand of assignment
#define LOW 0x0
^
C:\Users\siya2\Desktop\siya_Drive\Personal\learning outside school\Arduino\wall_follower\wall_follower.ino:70:42: note: in expansion of macro 'LOW'
else if (rs = LOW && ls = HIGH && cs = LOW){
^~~
C:\Users\siya2\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.8.6\cores\arduino/Arduino.h:40:14: error: lvalue required as left operand of assignment
#define HIGH 0x1
^
C:\Users\siya2\Desktop\siya_Drive\Personal\learning outside school\Arduino\wall_follower\wall_follower.ino:74:41: note: in expansion of macro 'HIGH'
else if (rs = LOW && ls = LOW && cs = HIGH){
^~~~
exit status 1
Error compiling for board Arduino Uno.
This report would have more information with
"Show verbose output during compilation"
option enabled in File -> Preferences.
I know it is a problem in the code, because i tested it on two different arduino boards, and both work. I even selected correct board type and port.