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

Detecting and acting on a redstone signal

Started by 5ubject, 06 December 2013 - 08:02 PM
5ubject #1
Posted 06 December 2013 - 09:02 PM
So I'm looking for information on how to set up a program which will tell a turtle to perform an action when it receives a redstone signal. But having just recently started using computercraft I have no clue where to start.
I have very basic knowledge on how to move, dig, and place with a turtle already so I don't really need instructions on that. My problems start when I get into detecting a redstone signal and then making it perform a couple actions.
Could someone point me in the right direction? Like a link maybe? I tried a couple places but I have like 7 tabs open that didn't help at all.
Zudo #2
Posted 07 December 2013 - 02:19 AM
http://www.computercraft.info/wiki/Os.pullEvent

This should help.
awsmazinggenius #3
Posted 07 December 2013 - 08:00 AM
If you os.pullEvent("redstone")followed by redstone.getInput("side of computer") (there is a short form, but it isn't important) you can get the input (true/false) on side (left, right, top, bottom, front, back), you can get the state of a redstone signal.

Just a note: Thanks for making your post readable. A lot of the posts in this section use that "internet grammar" that is ugly and a pain to read.