Detect redstone power level (signal strength) ?

  • Please make sure you are posting in the correct place. Server ads go here and modpack bugs go here

AndyMASH

New Member
Jul 29, 2019
206
0
0
I'm trying to make a pig farm where a Mob Counter will detect if there are more than 4 (or 5) pigs it will activate the slaughterhouse (the opposite for the Breeder). My problem is that the mob counter emits a redstone signal with the strength equal to the number of mobs in its range. I was thinking of using the Programmable RedNet Controller to detect if the signal strength = 4 (or 5, maybe) and then output a redstone signal on another side, but I don't know what function I would use for that. Also, is there anything in ProjectRed I could use instead ?
 

McJty

Over-Achiever
Mod Developer
May 13, 2014
2,015
2,519
228
twitter.com
Well a comparator gives a redstone signal when one side gets a signal above a level set to one of the other sides.
ProjectRed also has modded comparators if you prefer those.
 

rhn

Too Much Free Time
Nov 11, 2013
5,706
4,420
333
I'm trying to make a pig farm where a Mob Counter will detect if there are more than 4 (or 5) pigs it will activate the slaughterhouse (the opposite for the Breeder). My problem is that the mob counter emits a redstone signal with the strength equal to the number of mobs in its range. I was thinking of using the Programmable RedNet Controller to detect if the signal strength = 4 (or 5, maybe) and then output a redstone signal on another side, but I don't know what function I would use for that. Also, is there anything in ProjectRed I could use instead ?
7P52uxX.png
 

ratchet freak

Well-Known Member
Nov 11, 2012
1,198
243
79
besides the SFM/MFR cheat you can use a hopper and extra comparator

use the partially filled hopper and 1 comparator to produce the exact signal strength you need and use a second comparator to subtract it from the signal from the mob counter
 
  • Like
Reactions: malicious_bloke

Furious1964

Well-Known Member
Nov 10, 2012
1,436
70
63
How would I go about using Rednet to turn something on when it gets a signal strength of 3 or below and turn it off when the strength is 14 or higher?
 

rhn

Too Much Free Time
Nov 11, 2013
5,706
4,420
333
How would I go about using Rednet to turn something on when it gets a signal strength of 3 or below and turn it off when the strength is 14 or higher?
Combine a "Less than", "Greater than" and a "SR latch". Use Variables to send output from "Less than" and "Greater than" to the "SR latch" page.

ctKN2bx.png

qoDcH6L.png

IpZqoZ3.png
 

asb3pe

New Member
Jul 29, 2019
2,704
1
1
That Programmable Rednet Controller looks like BOTH the greatest thing in Minecraft and also the most complicated, unintuitive thing ever. Is there an Operations Manual for that thing somewhere? Do you need to be a Computer Systems Engineer to understand it? Luckily, I used to be one of those. Back in the 1980's. Never heard of a Schmitt Trigger tho, or a Seven Segment Encoder. I wasn't very good at computer engineering, which is why I quit it. LOL
 

rhn

Too Much Free Time
Nov 11, 2013
5,706
4,420
333
That Programmable Rednet Controller looks like BOTH the greatest thing in Minecraft and also the most complicated, unintuitive thing ever. Is there an Operations Manual for that thing somewhere? Do you need to be a Computer Systems Engineer to understand it? Luckily, I used to be one of those. Back in the 1980's. Never heard of a Schmitt Trigger tho, or a Seven Segment Encoder. I wasn't very good at computer engineering, which is why I quit it. LOL
There is indeed an operations manual for it ingame. Never really read it though. Find the wikis etc. easier.

Like:
http://ftbwiki.org/Programmable_RedNet_Controller

  • Schmitt Trigger
    • I: Input
    • Pd: Delay period. Input must be nonzero for Pd ticks before O is nonzero, but O goes to zero as soon as I does
    • O: Output
That sounds really handy actually. Might use that later :p
 

Furious1964

Well-Known Member
Nov 10, 2012
1,436
70
63
Ran into a slight problem with rhn's suggestions...whenever I start up my world, the REDNet system would activate the system again even when the pool is full.
 

rhn

Too Much Free Time
Nov 11, 2013
5,706
4,420
333
Ran into a slight problem with rhn's suggestions...whenever I start up my world, the REDNet system would activate the system again even when the pool is full.
I have had those problems before with the PRC when it need to evaluate the redstone signal strengths. Not sure what causes it, but I would guess it happens when the PRC is perhaps initially evaluated before the sources of the redstone signals gets loaded. :confused:

I have had to add certain preventions for this. Like adding a NOT gate from project red on the output and reversing the evaluation(less than to greater than etc.) so the default redstonesignal was always ON in the loading situation(relying on a "physical source" for the signal at first).

Perhaps if you describe what you are trying to achieve we can come up with an alternative or fix.
 

Furious1964

Well-Known Member
Nov 10, 2012
1,436
70
63
What I'm trying to do is have something measure the level of a Botania Mana Pool and if it's full, turn off the Mana Farm (i.e. turn off whatever is supplying Mana producing plants the materials they consume). And when the Pool is nearly empty, turn it back on.

For Example: Stopping the Mine Cart from distributing seeds.
dcl78TY.png


To sending a wireless Redstone Signal to stop coal from dropping.
fBBkZbo.png


And also, locking hoppers down to stop them from dropping resources.
JlhTWzA.png
 

rhn

Too Much Free Time
Nov 11, 2013
5,706
4,420
333
What I'm trying to do is have something measure the level of a Botania Mana Pool and if it's full, turn off the Mana Farm (i.e. turn off whatever is supplying Mana producing plants the materials they consume). And when the Pool is nearly empty, turn it back on.

For Example: Stopping the Mine Cart from distributing seeds.
dcl78TY.png


To sending a wireless Redstone Signal to stop coal from dropping.
fBBkZbo.png


And also, locking hoppers down to stop them from dropping resources.
JlhTWzA.png
Have you tried with BC gates? They have parameters for the Mana pools.
 

Furious1964

Well-Known Member
Nov 10, 2012
1,436
70
63
Have you tried with BC gates? They have parameters for the Mana pools.

Yes, I've tried them and the signal flip flops on and off when it reads the pool as full, but it's still being drawn upon. Not very accurate.
 

Henry Link

Popular Member
Dec 23, 2012
2,601
553
128
USA - East Coast
Have you tried ComputerCraft yet?

Update: On second thought scratch that. Mana pools don't support OpenPeripherals. So I'm not sure how you would read the level of the pool.
 
Last edited: