Here's an example flow.
[{"id":"e956d25316d0cce4","type":"join","z":"65c9b63cb09879a0","name":"","mode":"custom","build":"array","property":"payload","propertyType":"msg","key":"topic","joiner":"\\n","joinerType":"str","accumulate":false,"timeout":"","count":"3","reduceRight":false,"reduceExp":"","reduceInit":"","reduceInitType":"","reduceFixup":"","x":2100,"y":150,"wires":[["0199930b2b36b3c9"]]},{"id":"ac2c39148fb1e8e1","type":"inject","z":"65c9b63cb09879a0","name":"Reading 1","props":[{"p":"payload"},{"p":"topic","v":"","vt":"num"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"18","payloadType":"num","x":1950,"y":100,"wires":[["e956d25316d0cce4"]]},{"id":"9dee30a5a66c31ff","type":"inject","z":"65c9b63cb09879a0","name":"Reading 2","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"3","payloadType":"num","x":1950,"y":150,"wires":[["e956d25316d0cce4"]]},{"id":"9582d0acc2a9fa28","type":"inject","z":"65c9b63cb09879a0","name":"Reading 3","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"22","payloadType":"num","x":1950,"y":200,"wires":[["e956d25316d0cce4"]]},{"id":"0199930b2b36b3c9","type":"function","z":"65c9b63cb09879a0","name":"","func":"let a = msg.payload[0];\nlet b = msg.payload[1];\nlet c = msg.payload[2];\n\nlet total = a + b + c;\n\nmsg.payload = total;\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":2110,"y":190,"wires":[["9433cf93f867b403"]]},{"id":"9433cf93f867b403","type":"debug","z":"65c9b63cb09879a0","name":"Total","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"payload","targetType":"msg","statusVal":"","statusType":"auto","x":2250,"y":190,"wires":[]}]