Im using Arduino MEGA and using Hardware serial 1 and one software serial interface for communicate two different devices Nextion HMI(hardware serial 1) and Modbus temperature controller(software serial pin 12 as RX and 13 as TX).
In the code software serial requesting(sending) data to temperature controller every 500ms.
Sometime when I pressed a button on HMI it cant capture correctly because of software serial request.
How can I eliminate this problem and please explain relationship between software and hardware serial.