Statemachine with implementation of wallsensors.