Pular para o conteúdo principal

Pesquisa

How do I count the number of incoming signals?

  • Alfinch

    For now I'm just checking if the value is greater than the square root of 2, but it's a bit of a hack. I'd love to know what's really going on and how to do this properly.

  • Alfinch

    Nope that doesn't work either!

  • phort

    Create a Calculator gadget and check if each signal is Greater Than Zero. Sum those Calculator outputs together to get the number of active signals.

  • Alfinch

    So for four inputs I would need 3 calculators? First sum two pairs of inputs, then sum the sums?

  • phort

    Yeah, there's not really a way around needing N-1 calculators to sum N values together.

  • Alfinch

    Great, thanks!

  • Supposer

    If they're all sending 1, you should be able to just add them together to find out how many are activated. Or you can try using an AND gate or something?

    Another thing to fiddle with is the "blend mode" of an incoming signal. There are three modes, and one of them is a "weighted average" which might be your problem. Perhaps one of the other modes would give you a mode useful signal to work with?

Por favor, entrar para comentar.