Send string to and from raspberry pi

Is that not what I have done here: