look at this code I slapped together for you.. The new line function I snagged from somewhere on this forum. I forget where.
This will display to the monitor on top of the computer. And it will wait for the other computer to send it a message.
COMPUTER 1
Spoiler
mySide = "left"
local m = peripheral.wrap("top")
function NewLine()
local _,cY = m.getCursorPos()
m.setCursorPos(1,cY+1)
end
m.clear()
m.setCursorPos(1,1)
rednet.open(mySide)
m.write("Standing By...")
NewLine()
m.write(os.getComputerID())
local event, message, senderChannel, replyChannel, message, senderDistance = os.pullEvent()
m.clear()
m.setCursorPos(1,1)
m.write("The message was sent to : " ..message)
NewLine()
m.write("Channel : " ..senderChannel)
rednet.close(mySide)
NewLine()
m.write("Done")
NewLine()
This will let you broadcast the message over the network. The other computer which is listening will hear it and display the message on the screen.
COMPUTER 2
Spoiler
mySide = "left"
function nl()
local _,cY = term.getCursorPos()
term.setCursorPos(1,cY+1)
end
term.clear()
term.setCursorPos(1,1)
term.write(os.getComputerID())
nl()
rednet.open(mySide)
rednet.broadcast("Some Awesome Message !!!")
rednet.close(mySide)
term.write("Done")
Remember.. both computers that have a networking cable between them can not go beyond 63 blocks.. that means 63 or less blocks of networking cable between them. The computers count toward that number as well.
Also the MODEMS have to show RED . or that red-ish box inside the modem.. it reminds me of a red light I guess. It has to show on for the modem to be active. When you right click the modem you will notice the red "light" turning on or off.
Enjoy.
EDIT UPDATE : Updating my answer so as to explain the 64 block limit. I had forgot to mention that the reason for the 64 block limit is not that the mod or network cable itself is limited, its the fact that your character in the game loads a range of up to 64 blocks out from your character's position into memory. So once you move out of that area ( or the range of the other computer and / or the networking cable ), that chunk is no longer in memory. HOWEVER, if you use a chunkloader.. like chickenchunk for example, you can then send a signal across the network even further out then the 64 limit. I have tried it up to 256 blocks away, and it works, as long as the computer it talks too, as well as the lines in between, are staying in memory.