As Heater said, you do not provide enough information for an especially specific answer.
"The cloud" is not some all-knowing thing, it's just a bunch of servers. Either you'll be sending data to someone else's already-set-up server/service (in which case the format of data and method of transportation will be dictated by that server/service), or you'll be building both ends (local client and online server) yourself and you can use whatever formats and methods you prefer.
Two likely choices of methods for sending small amounts of data frequently are either via HTTP POST calls to a webserver, or by publishing messages to an MQTT broker.
I use MQTT for a lot of sensor readings that are passed between machines at home (e.g. one Pi is taking light level readings every 15 seconds and publishing the data to the local MQTT broker, and several other Pi's are using that data to continuously adjust the brightness of their backlights), but they could just as easily be talking to an MQTT broker out on the Internet. Adafruit has an MQTT broker that is available for experimental use at io.adafruit.com
. Without having to set up your own server or backend software in the cloud, you could test out the MQTT approach by signing up for an account on Adafruit's server, and then install mosquitto on your Raspberry Pi to test publishing sensor readings from the command line, and then go on to install the Paho MQTT libraries
for whatever language(s) you prefer. If I recall correctly, one can easily set up gauges and graphs and such on io.adafruit.com that will respond near instantly to new values published by your client software. (There may be other MQTT test sites out there, this is just one that I've run across before. Adafruit does nice stuff.)