Arduino to imitate a momentary switch

See: