This is a read-only snapshot of the ComputerCraft forums, taken in April 2020.
UrsaMauris's profile picture

Wireless communication

Started by UrsaMauris, 21 April 2017 - 03:51 PM
UrsaMauris #1
Posted 21 April 2017 - 05:51 PM
Hello pros,
I need help with switching from wired modem communication to wireless. Are there any equivalents of rednet.receive(2) -> which listens to any messages for 2 seconds, then continues on with the code? Also, is there any equivalent for protocols or is the way to replace them to use different channels? If so, can I do this?
local modem = peripheral.wrap("top")
modem.open(3,5,7)

thanks!
Larry84 #2
Posted 21 April 2017 - 06:30 PM
In theory, both wired and wireless modems use the same APIs - both modem and rednet APIs - so, unless you're using wired modems for connecting the computer to monitors or other non-self-code-executing ( :P/>) peripherals, you should be just fine replacing the two modems.
UrsaMauris #3
Posted 21 April 2017 - 06:54 PM
Oh my god, man, that saved me so f***ing much trouble and time, just replacing the modems! Thousand times thank you!
Larry84 #4
Posted 21 April 2017 - 09:13 PM
Everythig worked fine? :blink:/> I was not sure about that :P/>