added delay to wait for response from rpi