Detecting current w/ redstone

  • Is there currently a way to detect whether there is a current on a cable that outputs redstone signaling (or a machine that does this as a side effect)? IC2 and BC compatible mods are an acceptable answer, but I would prefer a solution that is just IC2.

    ----------

    Or give an MFSU to an enderman and whack him till he teleports to the right place and puts it down.

  • As far as i can tell using IC2 alone it is not currently possible. Although this simple thing would vastly increase industry capabilities if implemented.


    As for Buildcraft, I doubt it, if you are still referring to IC2 cables, although the new 3.0.1 gates and pipe wiring might be able to do something. I can only think of vague possibilities to do with a machine (running off the cable in question you want a redstone current) producing and item being pumped out through a gate that detects this and generates a redstone current.


    very convoluted and probably not worth the trouble, also Power converters and additional pipes are not updated for BC 3.0.0 or 3.0.1 so yeah ;(.


    As for any other mods, you could do the same convoluted thing with rp2 as they have a detector pipe that does generate a redstone circuit. Still complex, but slightly easier than BC I guess.


    Sorry I couldn't be more help.

    Hell, prove me wrong, Happy to be so 99% of the time, then I can learn stuff :)

  • Yeah, I couldn't tell you exactly how, but when I read the issue my first thought was "probably with an RP2 detector somehow". But I am a redstone n00b so I would not be able to elaborate.

    "A stupid man's report of what a clever man says can never be accurate, because he unconsciously translates what he hears into something he can understand." - Bertrand Russell

  • Craft it with single cable, with redstone on top. If there's power/current going through, go red (texture wise, alerting the player the cable is active), output redstone signal.

  • I'm currently tinkering on whether to build those gadgets as cables or as machines (yes, there's an actual difference codewise).


    Because i'm not sure whether a cable can detect electricity running through. And as well i doubt it can actuall prevent electricity running through (2nd gadget) when redstoned, except for "disabling" itself in the enet... which would cause a un-neat reload every time something turn on/off.
    Rather going to put that into some sort of "Redstone-Transformer" blocks, which act similar to Electric Storage blocks, but are either outputting or inputting redstone.


    Will probably be a pain to code the buffering, though.

  • Instead of a new block to switch current on/off, would it be easier to just modify the behavior of the current storage devices so that they don't "leak" when when redstoned and full?


    If there's a cable/block available that detects current, it would mean you could put one on the input cable and detect when the storage is full, allowing you to deal with full storage however you want. (connecting the output of the detector directly to the storage would give you something similar to the current behavior, but would be switching on and off a lot)

  • I'm currently tinkering on whether to build those gadgets as cables or as machines (yes, there's an actual difference codewise).


    Because i'm not sure whether a cable can detect electricity running through. And as well i doubt it can actuall prevent electricity running through (2nd gadget) when redstoned, except for "disabling" itself in the enet... which would cause a un-neat reload every time something turn on/off.
    Rather going to put that into some sort of "Redstone-Transformer" blocks, which act similar to Electric Storage blocks, but are either outputting or inputting redstone.


    Will probably be a pain to code the buffering, though.


    Hmm, yeah it will be difficult.


    The simplest solution would be to make them like transformers, but with no voltage change when power is sent through.

  • Given the REEEEALLY slow progress of the CPU i should definitely consider some block for this regard.
    Any suggestions?

    A block that accepts LV, drains 1 EU, and produces a redstone current. Recipe to include 1 RS torch, 1 RS dust, 1 Cable, 6 wood.


    EDIT and the machine should probably store 10 EU or so to prevent it from changing states too frequently because of the packet based energy.

    ----------

    Or give an MFSU to an enderman and whack him till he teleports to the right place and puts it down.

  • I would actually either prefer that it accept any voltage; even if it just drained 1 eU/t.


    Actually if it drains 1eU/t there should also be a mode for 'turning it off' which would be the redstone signal already high.

  • Actually, while we're on the subject of power management blocks... :D


    A PDU block would be interesting, too. Like a transformer, it has one input, and 5 output faces, but instead of changing voltage, it only outputs to the faces with an adjacent redstoned cable segment. Basically a multi-way switch.

  • Given the REEEEALLY slow progress of the CPU i should definitely consider some block for this regard.
    Any suggestions?

    Hmmm... OK, first I would probably implement this as a machine. It is a sensor after all.
    Second, I don't know the first thing about your code base of course, but I reckon a machine that needs to be in the circuit transformer-style would be the simplest way to implement it.
    Third, would a machine that attaches to a cable T-Stück style be feasible? I have no clue how to solve the obvious issues with multiple adjacent cable runs and the like.


    While you're at it, could we get thermometers? *cackles and flees*

  • After some discussion with Player we've decided to implement both directions as cable-types.
    Coding the buffering on a machine would be too complex, using actual cables is a better alternative.


    HOWEVER the disadvantage is, both codes used by the cables are slightly more CPU-costly then the block-wise implementation.
    The EU>R cable will need to use the unoptimized EU-Meter function to determine current flow.
    The R>EU cable will need to disconnect and reconnect itself from the enet, causing a whole netupdate.


    Both won't be severe unless spammed, but i strongly disrecommend putting a RP clock next to the latter one.

  • Wait, wait.... Are you saying that we'll be converting redstone signals directly into an EU voltage of some sort? What I mean to say is, if I connect Redstone -> New Redwire -> Machine, with NOTHING else (no generators) the machine will get voltage from the redstone? I HOPE I'm misunderstanding this... I think what people really want is just a detection system, which will let us (for example) turn on a redstone signal when there's power in a wire, and (for example) turn OFF a wire/machine/power grid when there's a redstone signal.....

  • Wait, wait.... Are you saying that we'll be converting redstone signals directly into an EU voltage of some sort? What I mean to say is, if I connect Redstone -> New Redwire -> Machine, with NOTHING else (no generators) the machine will get voltage from the redstone? I HOPE I'm misunderstanding this... I think what people really want is just a detection system, which will let us (for example) turn on a redstone signal when there's power in a wire, and (for example) turn OFF a wire/machine/power grid when there's a redstone signal.....

    No, I'm pretty sure he is referring to bringing back a block that stops conducting energy when redstone is applied. It is actually fairly obvious if you read the whole thread.



    For refrence: IC1 had the switch block, right now there is no equivalent.

    ----------

    Or give an MFSU to an enderman and whack him till he teleports to the right place and puts it down.

  • Detector and Splitter Cables will be included in the 1.337 release.


    Both are made of HV cables, redstone and some smaler ingridents and are capable of transmittinh any voltage strength with acceptable low lost (they're still too exensive and way to unstylish to build whole networkds exclusively of them, though).
    Detector cables will update once each second, emitting redstone if any current passed by within the last second.
    Splitter cables will update each second and "disconnect" from the adjacent cables if powered by redstone.


    The second-delays are necessary, because there could be issues with too intense CPU-load otherwise.