Step-by-step programming and how to plot data from a test measurement

then sending the collected data should not be a problem as well.
Use this code for arduino yun to send data to cayenne Cayenne-MQTT-Arduino/ArduinoYun.ino at master · myDevicesIoT/Cayenne-MQTT-Arduino · GitHub
Have a look at this topic on how to send data with correct data types Data types for Cayenne MQTT API