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

quick and easy one - wireless modem

Started by Dustmuz, 15 December 2014 - 01:17 PM
Dustmuz #1
Posted 15 December 2014 - 02:17 PM
hey there..
just working on some of the other wireless programs for my base..

but i can get my "lights" to work..


local m = peripheral.wrap("right")
m.open(1)

local event, modemSide, senderChannel, replyChannel, message, senderDistance = os.pullEvent("modem_message")
local light = "off"

if light == "on" and message == "smeltery" then
  light = "off"
  rs.setOutput("back",false)
elseif light == "off" and message == "smeltery" then
  light = "on"
  rs.setOutput("back",true)
end


i dont get any errors from the code, but it wont turn the lights on or off, when i use modem.transmit(1,1,"smeltery") on another computer
am i doing something wrong in the code somewhere or??
theres 72 blocks, between the 2 computers
Edited on 15 December 2014 - 01:20 PM
Lyqyd #2
Posted 15 December 2014 - 03:48 PM
Normal wireless range below y=92 is 64 blocks, so they are likely too far apart.
Dustmuz #3
Posted 15 December 2014 - 05:05 PM
arh okay.. will have to move the main building then :D/>
thanks :)/>