mesecons icon indicating copy to clipboard operation
mesecons copied to clipboard

Add pulsar and flip-flop

Open numberZero opened this issue 5 years ago • 2 comments

Fixes #474. Also adds a simple memory cell.

The Pulsar detects a rising edge and outputs a pulse 2 Mesecon ticks long. Sharper (1-tick) pulse is possible but while e.g. gates and movestones work well with that, lamps and pistons don’t: screenshot_20200918_224810

The Flip-Flop simply toggles its state on a rising edge.

Everything seems to work well, testing is welcome. Crafting and documentation are pending)

numberZero avatar Sep 18 '20 20:09 numberZero

Any ideas for crafting recipes?

Also if there should be 3 kinds of pulsars, what could their images look like?

numberZero avatar Sep 18 '20 20:09 numberZero

:+1: Code looks fine. Also tested, it works well. (You might want to use my meseconomenter mod for testing the pulsar: https://github.com/Desour/meseconometer (Just give a mesecons signal to the activation port (default A), then give some signals to the device and rightclick to see the changes logged based on globalstep time.))

Crafting recipes could include what one would normally use to build the devices, eg. nor gates and insulated crossover for the flip flop; NOT gate, AND gate and wire for the pulsar. For 3 kinds of pulsars, you could add recipes to craft one to the other: rising-edge-detector -> falling-edge-detector -> any-edge-detector -> rising-edge-detector (And additionally eg. NOT gate, NOR gate and wire for the falling-edge-detector.) For the images you could write a 1 and a 0 (or o and I) onto the pulsars.

Desour avatar Sep 19 '20 14:09 Desour