Avoid any short pulses which could cause servo twitches or damage by adding a shutdown command to the PIO program and checking it's in that safe part of the loop before detaching the servo.
Avoid any short pulses which could cause servo twitches or damage by adding a shutdown command to the PIO program and checking it's in that safe part of the loop before detaching the servo.