Need help with a pressure plate script (C#)(2D)

I want it so whenever I am not colliding with the pressure plate the boolean is false.
This is probably easily solved but I am new to coding, still would appreciate the help.
(It’s a 2D game)

Here is my script :

//Pressure plate variables
public bool pressurePlate = false;

// Use this for initialization
void Start () {

}

// Update is called once per frame
void Update () {
	if (pressurePlate == true) {
		GetComponent<Animation>().Play ("pressurePlateDown");
	}
	if (pressurePlate == false) {
		GetComponent<Animation>().Play ("pressurePlateUp");
	}
}
void OnCollisionEnter2D(Collision2D other){
	if (other.transform.tag == "Player") {
		pressurePlate = true;
	}
}

}

Is there any reason why you play the animation so frequently? Instead, I would use OnCollisionEnter2D() to set the value to true and OnCollisionExit2D to set it to false.
In each of these functions, play the respective animation. If you want it to keep playing, then set it wrap mode in the Inspector to Looping.