Need help for my arduino project PLEASE ANYONE!

Make lastState2 an int instead of boolean and it is still !=