How to create an electronic magnetic pendulum circuit

Here is another video where the "How To" is explained and the simple schematic is presented toward the end. I would think that a small micro could be used to activate the mosfet with various delays from the reed switch closure (or a hall effect switch) instead of the capacitor. One could then program some interesting sequences. Never made one though.