Here is some code to read the sensor
Here is an example of uploading data to Cayenne with MQTT via python on the Pi.