Move GPIO writes to a separate thread.