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

Help with detecting redstone change?

Started by harrysmidt, 21 February 2014 - 07:42 AM
harrysmidt #1
Posted 21 February 2014 - 08:42 AM
Hello there!

I just decided to get into computercraft a bit and I've hit a brick wall.
I want the computer to detect change in a redstone signal input (from off to on or vice versa).
I've got the functions I want to execute, but I'm stuck on how to detect the change in a signal from off to on or from on to off.

Could anyone help me with this?


Btw I have Gravity's LuaIDE, not exactly sure how it works, but maybe it can be used.
Lyqyd #2
Posted 21 February 2014 - 10:14 AM
Whenever a redstone change occurs, a "redstone" event is thrown. You could then look at all of the inputs to detect what changed.
Bomb Bloke #3
Posted 21 February 2014 - 07:16 PM
Are you having difficulty detecting the change, or what the change was?

Does your script also try to do other things in the meantime?

It's difficult to suggest anything without seeing your script.