ArduinoMidiFootController/Button.cpp
void Button::Monitor()
{
	Status = digitalRead(PinNumber);
	
	if (Status != LastStatus) {
		if (Status == LOW) {
			//Serial.println("ButtonPressed" + Description);
			Press();
		}

		if (Status == HIGH) {
			Release();
			//Serial.println("ButtonReleased" + Description);
		}
	}
	
	else if (Status == LastStatus) {
		if (Status == LOW) {
			//Serial.println("Holding Button" + Description);
		}
	}
	
	LastStatus = Status;


}
// Check for buttons change of status
Check for buttons change of status
Check for buttons change of status
void Button::Monitor()
{
	Status = digitalRead(PinNumber);
	if (Status != LastStatus) {
		if (Status == LOW) {
			Press();
		}
		if (Status == HIGH) {
			Release();
		}
	}
	else if (Status == LastStatus) {
		if (Status == LOW) {
		}
	}
	LastStatus = Status;
}
void Button :: Monitor ( ) { Status = digitalRead ( PinNumber ) ; if ( Status != LastStatus ) { if ( Status == LOW ) { Press ( ) ; } if ( Status == HIGH ) { Release ( ) ; } } else if ( Status == LastStatus ) { if ( Status == LOW ) { } } LastStatus = Status ; }
Check for buttons change of status
Check for buttons change of status
//Serial.println("ButtonPressed" + Description); //Serial.println("ButtonReleased" + Description); //Serial.println("Holding Button" + Description);