Report this content
We want the Dreams coMmunity to be a safe, diverse and tolerant place for everyone, no matter their age, gender, race, sexual orientation or otherwise. If you believe this content to contradict these principles, you can file a report for our coMmunity teams to investigate.
Note that misuse of the reporting tool will not be tolerated.Item being reported:
The built in selector gadget is a little cumbersome though and seems a little limiting in its nature, which has lead me on this logic quest.
So I have a chip nearly finished last night. It has 7 inputs:
-next (on/off)
-prev (on/off)
-set (on/off)
-set value
-reset (on/off)
-min
-max
And one output:
-current
So all of the (on/off) inputs work without a pulse, so any “true” value will cause them to activate. Certain things override each other. For example if you try and next/prev at the same time then it uses an XOR to cancel them out!
Thanks for the tip TAPGiles about using the calculator as the value store. So I basically have the calculator feeding back into itself and then the second wire is a + operation. If I want to add I just pass a +1 into the second wire. Subtract I pass a -1.
So every loop it might do value = value + -1. Or if nothing is currently “on” it will do value = value + 0.
There are also conditions for checking the min/max range. And finally some logic for dealing with setting the value when the set is “on”.
Just gotta iron out one big and then it’s done. So what is it for? Basically it’s a “pro” version of the counter. You don’t have to rely on pulses so can use it for continuous logic calculations.
Perfect for a state machine! Imagine wiring each state output back into itself into the “next” input. So the state machine will loop through its state as quickly as Dreams allowed with its logic update ticks!
Once it is complete, I can embed it inside another chip.... a state machine chip. This will have predefined logic to output a wire per state. Like we have with the selector.