For your kind of application, I would rather suggest to use Arduino ESP framework.
Start with a simple Blink sketch, upload this sketch firmware and look if the ESP is actually blinking the LED.
Then, start looking at libraries/ESP8266HTTPClient/examples/BasicHttpClient, tweak the URL so that it will send the HTTP request to your RasberryPi (BTW, you will need an Apache server on the RaspberryPi).
After having that working, add more code to your ESP sketch, and add some PHP scripts on the Pi side to handle and process the data received from ESP, create some nice Web page on the Pi to display the data, probably with graphs, etc.