Originally shared on the public FactorioPrints / Factorio School archive (factorioprints.com · factorio.school). Authorship preserved from the public catalog.
How to built a button in Factorio 2.0:
You use nullifying current minus the last tick to create an event that fires every time the circuit network changes and use this for a conditional gate copying from the constant combinator you want a 1 tick pulse from.