Need help monitoring IC2 reactor with ComputerCraft

  • Please make sure you are posting in the correct place. Server ads go here and modpack bugs go here
  • The FTB Forum is now read-only, and is here as an archive. To participate in our community discussions, please join our Discord! https://ftb.team/discord

Jamie Rice

New Member
Jul 29, 2019
1
0
0
I have an IC2 reactor schematic ready, but it needs to be shut down every ten minutes for a short interval in order to cool down. I know this can be done through redstone with ComputerCraft, but I'm not exactly sure how. I know basic programming in JS, but lua is throwing me for loops. Any advice?
 
I have an IC2 reactor schematic ready, but it needs to be shut down every ten minutes for a short interval in order to cool down. I know this can be done through redstone with ComputerCraft, but I'm not exactly sure how. I know basic programming in JS, but lua is throwing me for loops. Any advice?
I would suggest using Nuclear Control to determine when the reactor gets too hot and needs to cool down. Then you could just set up something as simple as:
Code:
while true do
   if redstone.getInput("left") == true then    --This is the input from the Remote Thermal Monitor, set to output redstone signal once reactor gets too hot.
      redstone.setOutput("right", false)   --output to reactor turned off
      sleep(60) --This is the number of seconds the reactor needs to cool down
   else
      redstone.setOutput("right", true)   --output to reactor turned on
   end

   sleep(1) --Just to prevent the code from using too many resources.

end