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

How do I...

Started by V497_Vesper, 10 November 2017 - 08:04 PM
V497_Vesper #1
Posted 10 November 2017 - 09:04 PM
I am looking to start working on the programme I mentioned in my previous post so how do I make the computer listen for a redstone signal? as it is integral to my program and how to make it see how much power it has stored but lets start at the beginning

first aim is to make the PC listen for either a redstone signal or another computer? My Minecraft version is 1.7.10 and the computer craft version is 1.73 (i think)
Luca_S #2
Posted 10 November 2017 - 10:02 PM
You might want to look into the Redstone API and Redstone Events
A simple program could be this:

while true do
  print("Redstone strenght on the back side: " .. redstone.getAnalogInput("back"))
  os.pullEvent("redstone")
end
Which will print the new redstone input from the back if it changed.