Arduino RS485 communication for home automation project

just add all three code segments together.

I've never been very good at adding code. Somehow my calculator just can't figure out what code 1 + code 2 is supposed to be.

Nor have you provided the receiver code.