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

Computer Reactor System

Started by xXDaneben, 11 May 2013 - 08:14 AM
xXDaneben #1
Posted 11 May 2013 - 10:14 AM
(I play Tekkit Lite)

Hello Community,
ich have a problem.
I want to make a super computer for a friend, but it don't work. I want to print the reactor heat on a monitor but the CcSensors are more than 7 blocks of the reactor away. Now i want to make a Computer near the Reactor with the Sensor, but now i don't know how i can send the Signal from 1 Computer to another computer and from that to the monitor.
I hope you can help me!
Lyqyd #2
Posted 11 May 2013 - 04:34 PM
Split into new topic.
Engineer #3
Posted 11 May 2013 - 05:18 PM
You are going to most likely use rednet. However, there are certainly more alternatives, but I will only explain this way to you.

You make two modems (Not Wired modems!), and place it somewhere on your computer. You can place it by shift+click it, otherwise it would open the GUI.

Now you want to collect some information. We are going to need the ID number from the computer where you are sending it towards. You can do that by typing id in the prompt, it will return #<some number here>. Remember that number good!

Now we are going to get programming, Im going to lay out the basics for you, if you have questions about the explanation, please post the question in this topic.

First we want to open rednet, or how others may call it, WiFi. You will need the side of the modem where you have placed it.
All the six sides are:

left
right
top
bottom
back
fron

So now we open rednet:

rednet.open('side') --# Note the quotation marks
--# You can also close it if you want at the end of your program, but this is not necessary
rednet.close('side')

You can send messages only when the rednet is open from both computers.
To send a message:

rednet.send( <id from the receiver>, <string message> )
--# But the other computer must be in receive mode to receive messages
local senderID, message, distanceBetweenComputers = rednet.receive( <timeout, if not filled it, it will wait until it receives a message. So if its not filled in, its in 'waiting until a message finally receives' mode> )

Those are pretty much the basics of rednet. Now for the monitor, Im going to quote myself for what I posted on an other topic:

The quote:
To make a log on a monitor we have to:
- wrap to the monitor
- write to the monitor

Lets take a crash course peripherals!

First of all we can easily write to the monitor using:

peripheral.call("side", "write", "yourText")
But this gets annoying after a while, so you can assign a variable to link to the peripheral:

local whateveryoucallthis = peripheral.wrap("side")
Now we can write to the monitor using:

whateveryoucallthis.write("yourText")
You can also redirect the term, wich is a better practise.
This do we like:

term.redirect( whateveryoucallthis )
--# Normal code like you are just in the termanil. It will show on the monitor
term.restore() --#After this, you can write on your normal screen again
xXDaneben #4
Posted 12 May 2013 - 04:09 PM
Thanks for the answer.
I know alright how to open the Wifi.
I just need a Code for the real time print.
I have the sensor near the reactor with the computer.
Now i need a transfer code.
The transfer code must send from the first computer to the a second the Heat ect.
I hope you can help me
Thanks a lot for all :)/>
Christian