Posted 24 December 2015 - 10:24 PM
Hi
I'm making an emc/item counter with CC and redstone pipes.
One pipeline is for the MK1(left side)
The other pipeline is for the MK2 (right side)
I have 2 redstone pipes which are connected on the pipeline of the EMC-Flowers.
Like this a redstone signal will be pulsed when an item is in the redstone pipe.
The Redstone pulse is read by the computer. It counts the amount of items flowing through it. –(this happens on both sides)
Now I want to make a pulse counter on CC.
This is my code, but whenever an item passes through the redstone pipe, it counts for 2 points and not 1.
Also look at the photo of the setup
I'm making an emc/item counter with CC and redstone pipes.
One pipeline is for the MK1(left side)
The other pipeline is for the MK2 (right side)
I have 2 redstone pipes which are connected on the pipeline of the EMC-Flowers.
Like this a redstone signal will be pulsed when an item is in the redstone pipe.
The Redstone pulse is read by the computer. It counts the amount of items flowing through it. –(this happens on both sides)
Now I want to make a pulse counter on CC.
This is my code, but whenever an item passes through the redstone pipe, it counts for 2 points and not 1.
Also look at the photo of the setup
os.pullEvent = os.pullEventRaw
local pulses = 0
while true do
local event,p1 = os.pullEvent()
if event == "redstone" then
pulses = pulses + 1
end
term.clear()
term.setCursorPos(1, 1)
term.write("Counter")
term.setCursorPos(9, 1)
term.write(pulses)
end