ArduinoMega2560 - communicating through RS485 in both directions using MAX485

if variable is static like your highWaterMark, it holds it's value globally, but is visible only for the function where it is declared