I think there should be a command for a short pulse of on and off of redstone power, both normal power and Redpower power.
[1.4] Add a command for a pulse of redstone power.
Started by pendragon36, May 13 2012 03:23 AM
6 replies to this topic
#1
Posted 13 May 2012 - 03:23 AM
#2
Posted 13 May 2012 - 09:27 AM
You can accomplish this with a API..
There is also a program for this.
All they would be adding is a API you could easily do yourself.
Look up "redpulse"
There is also a program for this.
All they would be adding is a API you could easily do yourself.
Look up "redpulse"
#3
Posted 13 May 2012 - 09:32 AM
well, for normal redstone you could just say
redstone.setOutput(side,true) os.sleep(1) -- sleep one second redstone.setOutput(side,false)Redpower can work with pulses of one tick length, that is getting a bit difficult, as you can't sleep that precise. But you can also pass values <1 to sleep().
#4
Posted 13 May 2012 - 07:16 PM
I've got redpower machines to work with sleeps as low as 0.1, which is faster then the redpower timer
#5
Posted 13 May 2012 - 10:02 PM
Xfel, on 13 May 2012 - 09:32 AM, said:
well, for normal redstone you could just say
redstone.setOutput(side,true) os.sleep(1) -- sleep one second redstone.setOutput(side,false)Redpower can work with pulses of one tick length, that is getting a bit difficult, as you can't sleep that precise. But you can also pass values <1 to sleep().
Or make it a API
function pulse( _nSide, _nTime )
redstone.setOutput( _nSide, true)
sleep(_nTime)
redstone.setOutput( _nSide, false)
end
pulse("back", 1) -- pulse for 1 second on the back of the pc
#6
Posted 13 May 2012 - 10:13 PM
ComputerCraftFan11, on 13 May 2012 - 10:02 PM, said:
Xfel, on 13 May 2012 - 09:32 AM, said:
well, for normal redstone you could just say
redstone.setOutput(side,true) os.sleep(1) -- sleep one second redstone.setOutput(side,false)Redpower can work with pulses of one tick length, that is getting a bit difficult, as you can't sleep that precise. But you can also pass values <1 to sleep().
Or make it a API
function rs.pulse( _nSide, _nTime )
redstone.setOutput( _nSide, true)
sleep(_nTime)
redstone.setOutput( _nSide, false)
end
pulse("back", 1) -- pulse for 1 second on the back of the pc
#7
Posted 13 May 2012 - 10:16 PM
MysticT, on 13 May 2012 - 10:13 PM, said:
ComputerCraftFan11, on 13 May 2012 - 10:02 PM, said:
Xfel, on 13 May 2012 - 09:32 AM, said:
well, for normal redstone you could just say
redstone.setOutput(side,true) os.sleep(1) -- sleep one second redstone.setOutput(side,false)Redpower can work with pulses of one tick length, that is getting a bit difficult, as you can't sleep that precise. But you can also pass values <1 to sleep().
Or make it a API
function rs.pulse( _nSide, _nTime )
redstone.setOutput( _nSide, true)
sleep(_nTime)
redstone.setOutput( _nSide, false)
end
pulse("back", 1) -- pulse for 1 second on the back of the pc
Oops, updated the post.
1 user(s) are reading this topic
0 members, 1 guests, 0 anonymous users











