I have made a banking system using Redpower2 cables (and LAN cables from Immibis Peripherals).
This currency gets put through a transposer, which goes through a sorting machine, and the currency gets sorted through their respective colored pipes. Once they are through the correct pipe, they get counted through an item detector, which emits a pulse through a specific colored wire that is connected to bundled cables.
Problem: When I insert 2 stacks (e.g. stack of gold bars, and stack of copper bars) of items, they get sorted, but with these multiple redstone pulses going through, the computer mistakens the count more than once. So instead of a total count of 128, I get a number bigger than that.
Im just wondering if there is a way around this, or if my code is even correct:
if event == "redstone" then
if redstone.testBundledInput(side, colors.white) == true then
count1 = count1 + 1
elseif redstone.testBundledInput(side, colors.orange) == true then
count2 = count2 + 1
elseif redstone.testBundledInput(side, colors.magenta) == true then
count3 = count3 + 1
elseif redstone.testBundledInput(side, colors.lightBlue) == true then
count4 = count4 + 1
elseif redstone.testBundledInput(side, colors.yellow) == true then
count5 = count5 + 1
elseif redstone.testBundledInput(side, colors.lime) == true then
count6 = count6 + 1
end
end
(This is just a part of the code.)EDIT: Not sure if this matters, but I am currently using ComputerCraft 1.5