Man arrested for shooting at officer during attempted armed robbery