I have two Arduino Mega 2560 that i am trying to connect togeather via the communication ports. All of my research says this should be working, but for the life of me i cant get it figured out. they just never seem to connect.
Well, your code on the sender is just going to send "1" over and over again; it won't actually count. And, you should declare a type for counter. Maybe something like this:
i took out the counter bit because nothing was happening so i just wanted to eliminate all the extra stuff to see if i couldnt figure out where the problems were coming from.
Are you using the default Serial hardware port to talk to the host PC, or to talk to the remote Arduino? It isn't going to be happy doing both, but since you're printing trace messages to the same Serial port that you're using for your coms test, I suspect that's what you're asking it to do.