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

computer monitor link

Started by Willfrieden, 09 April 2012 - 04:28 PM
Willfrieden #1
Posted 09 April 2012 - 06:28 PM
Hello my english is not so good but i try my best :D/>/>

I write a script for storage and i want that the script show the output on a monitor over redstone bundled (color.black).
I have read many threads and google but it dosnt work i try over rednet receive and send dosnt work but i dont no why then i try over redstone signal i go a step back but it dosnt work.



i know that the script is not finish and not so good but is my own one i want to learn more pls help or write somthing example

the wiki help much but not in all.

a example form try with rednet:

rs.setBundledOutput("top", colors.black)
rednet.open("top")
181, message, distance = rednet.receive()
if rednet.receive() == true then

term.write(message)



some pics
http://picload.org/image/rcdggao/2012-04-09_19.24.png
http://picload.org/image/rcdggap/2012-04-09_19.24.png


http://pastebin.com/nmXHCeWM the script

http://pastebin.com/xbLGWwVT pc monitor script


grettings from WILLI :P/>/>
cant_delete_account #2
Posted 09 April 2012 - 06:35 PM
181, message, distance = rednet.receive()

should be:

id, message, distance = rednet.receive()

But, there is a bit more problems, so I'll post the fixed code:

rs.setBundledOutput("top", colors.black)
rednet.open("top")
id, message, distance = rednet.receive()
print("Computer #"..id.." has sent us a message!")
sleep(0.5)
print("The message is:")
sleep(0.3)
print(message)
MysticT #3
Posted 09 April 2012 - 06:50 PM
If you want to use a bundled cable for rednet, you shouldn't set any color on it. rednet uses the black cable for control, so if you turn it on rednet can't use the bundled (it thinks the cable is sending/receiving a message).
Willfrieden #4
Posted 09 April 2012 - 07:25 PM
thanks for the code script kiddy it works fine now i got it

but now i want to try


id = 24
rs.setBundledOutput("top", colors.black)
rednet.open("top")
id, message, distance = rednet.receive()
if rednet.receive() == true then
print("Computer #"..id.." has sent us a message!")

@scripter do you mean that 1 cable bundled only for rednet ?? if i want to send strings.

and big Thanks for the fast and good help :P/>/>
Luanub #5
Posted 09 April 2012 - 10:08 PM
MysticT means you need to remove this line of code if you are sending rednet messages over the bundled cable attached to the top of the computer.


rs.setBundledOutput("top", colors.black)

It makes the cable unusable for rednet.

If you need to send a signal via the black cable to another computer do it on another cable.

Also just for better use of the commands I would do
to turn on:

c = colors.combine( c , colors.black )
rs.setBundledOutput("side", c )
and to turn off

c = colors.subtract( c , colors.black )
rs.setBundledOutput("side", c )
Edited on 09 April 2012 - 08:41 PM
Willfrieden #6
Posted 10 April 2012 - 12:56 AM
thanks for the code code kiddy i will try it later.

now my edit code working randomley ^^
i see its not complet but i learn^^

example pic how it works:

http://img3.picload.org/image/rcdrrai/2012-04-10_00.52.png


Computer script:
http://pastebin.com/FynY3XTS

Monitor script:

http://pastebin.com/ecGc5rSE

i think the code is too big can i make it cleaner ? with strings ?