Why the value in output is 0 instead of 1

why does this code giving value as 0 in output.I haven’t put 1 at LOW .it should give value as 1 instead.

You cannot write two commands on the same pin.
Either it should be digitalWrite() for output or digitalRead() for reading input.
If you have written code for Arduino, you might have known this earlier.

2 Likes

You cant have multiple commands for a single pin and I suggest you to recheck the code again. Thank you.

You connot write more than once command on same pin