Wireless Modem
From ComputerCraft Wiki
Description
Modems are blocks, which can be used to wirelessly transfer data between computers and turtle, using "rednet" commands. To place a modem on a side of your computer, sneak and then click right (sneak usually = left Shift key)!
you can turn the modem on and off by typing in lua: "rednet.open ( side )" - turn on, "rednet.close ( side )" - turn off
Modems can send messages to other modems located up to 64 metres away, or 17 metres during a thunderstorm.[1]
example details
- place 2 computers (or turtles) and add to them the Modem (by placing on the side while being in sneaking mode - LShift)
- type "lua" on both
- then type "rednet.open (" side where's the modem ")" on both
- check that the modems are redlighted a bit = turned on
- on the first one type "rednet.receive (60)" - 60 = time to listen in seconds, the computer will be frozen until receiving any message or runing out of time
- on the second one type "rednet.broadcast ("hi all")" - "hi all" = message, returns "true"
- and now you will see that "hi all" on the first one (the number is computerID, then the message)
for more help type "help rednet" or get it here: http://computercraft.info/wiki/index.php?title=REDNET