Before I try to read your code and figure out what you want please spend the time to read the forum guidelines. Since I cannot see what you have also post links to technical information on the hardware items and your preliminary schematic be sure to show all power, ground and power sources. Useful links - check here for reference posts / tutorials Frizzing diagrams are not considered schematics here. Your pictures are nice but I cannot follow them.
Tx goes to Rx. Also check your grounds they should all be connected.