Serial communication problem with RS2428 relay module

Your post was MOVED to its current location as it is more suitable.

Please follow the advice given in the link below when posting code. Use code tags (the </> icon above the compose window) to make it easier to read and copy for examination