Working on main loop, added GoPro trigger function