Farm gate opens and closes automatically