well, I think I found the problem - it never treats inputs as inputs, despite a high level on LEFT or RIGHT, it still =0

Seems like I need some command to configure pins as input?