hey there again fellow Crafters
now, i have moved on to some more "practical" uses for my programming, as my girlfriend came with the idea of making a prison, with cells and all that stuff..
now, to save myself from having to run 10000 network cables, i was thinking the following.
at each door, have an advanced computer, with a wireless modem.
have a control room, with 1 computer aswell, also with a wireless modem..
now.. heres where i need the help..
1:how do i get the wireless modems to talk to eachother, ALL of them.. on the same channel..
2:would it be possible to make a program on the "control" computer, that can send a signal, to a certain computer, to open/close the door
example would be, that you on the control comp wrote "open cell 2" then cells 2 computer would open, and not any other.. ***
*** for this, would it require different programs on ALL the door computers, or could i make 1, and copy it, and just change the "name" of the computer???
help with an idea.. Prison
Started by Dustmuz, Sep 24 2014 05:59 PM
5 replies to this topic
#1
Posted 24 September 2014 - 05:59 PM
#2
Posted 24 September 2014 - 06:19 PM
Now, why would you want them to all be on the same channel? What's wrong with multiple channels? I would recommend looking at the modem api.
Also, as to naming them, you can get the computer label from within a program.
I would think the cells would be something like this:
Also, as to naming them, you can get the computer label from within a program.
I would think the cells would be something like this:
os.pullEvent = os.pullEventRaw() --#so nobody can terminate it
local label = os.getComputerLabel()
while true do
local event = { os.pullEvent() }
if event[ 1 ] == "modem_message" and event[ 5 ] == label then
rs.setOutput( "side", true ) --#change side to whatever side the door is on
sleep( 1 )
rs.setOutput( "side", false ) --#also change side
end
end
#3
Posted 24 September 2014 - 06:34 PM
have tried the modem thingy, but that didnt work out so well for me on the wireless modems
hehe..
worked fine for the wired one though
might just be me, that does something wrong. but do they work "exactly" the same, except one is with cable other is not?
now that code would have taken me 4 days, 6 hours, and maybe 4 times help from this community.
so thaaanks
worked fine for the wired one though
might just be me, that does something wrong. but do they work "exactly" the same, except one is with cable other is not?
now that code would have taken me 4 days, 6 hours, and maybe 4 times help from this community.
so thaaanks
#4
Posted 24 September 2014 - 07:15 PM
Dustmuz, on 24 September 2014 - 06:34 PM, said:
have tried the modem thingy, but that didnt work out so well for me on the wireless modems
hehe..
worked fine for the wired one though
might just be me, that does something wrong. but do they work "exactly" the same, except one is with cable other is not?
now that code would have taken me 4 days, 6 hours, and maybe 4 times help from this community.
so thaaanks
worked fine for the wired one though
might just be me, that does something wrong. but do they work "exactly" the same, except one is with cable other is not?
now that code would have taken me 4 days, 6 hours, and maybe 4 times help from this community.
so thaaanks
The only difference between wired and wireless is wireless cannot connect to peripherals and does not need cable.
Edit: Also, as Bomb Bloke pointed out, wireless modems do have a range limit.
It starts at 64 meters (64 blocks) and extends the farther up you place the modem. 384 meters is the max distance, at block 256.
Edited by KingofGamesYami, 24 September 2014 - 11:03 PM.
#5
Posted 24 September 2014 - 10:50 PM
There's also the question of range.
#6
Posted 25 September 2014 - 10:58 AM
Bomb Bloke, on 24 September 2014 - 10:50 PM, said:
There's also the question of range.
1 user(s) are reading this topic
0 members, 1 guests, 0 anonymous users











