# Need to write one function that will return 3 values

**URL:** <https://discourse.nodered.org/t/need-to-write-one-function-that-will-return-3-values/30931>\
**Category:** Dashboard\
**Created:** [30 July 2020 14:27 UTC](https://discourse.nodered.org/t/need-to-write-one-function-that-will-return-3-values/30931 "2020-07-30T14:27:02Z")\
**Posts on this page:** 1\
**Showing post:** 12

<div class="post-metadata">

**Author:** ![dynamicdave](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/dynamicdave/32/96_2.png) [@dynamicdave](https://discourse.nodered.org/u/dynamicdave)\
**Post date:** [31 July 2020 17:15 UTC](https://discourse.nodered.org/t/need-to-write-one-function-that-will-return-3-values/30931/12 "2020-07-31T17:15:12Z")

</div>

This is the module I used PZEM-04 0-100A from BangGood with a serial connection to Wemos.  
I cut the USB connector off the end of the lead and fed the Tx and Rx signals through level shifters as the PZEM-04 used 5V logic and the Wemos is 3v3. It took quite a lot of trail-and-error to find the best pins to use on the Wemos with Tasmota. I can draw out the circuit/schematic over the weekend if you need it.

> **[PZEM-004T 0-100A AC Communication Box TTL Serial Module Voltage Current Power...](https://uk.banggood.com/PZEM-004T-0-100A-AC-Communication-Box-TTL-Serial-Module-Voltage-Current-Power-Frequency-Modbus-RTU-With-Case-p-1562595.html?rmmds=myorder&ID=6273466&cur_warehouse=CN)**
>
> Online Shopping at Banggood.com！

---

_[View the full topic](https://discourse.nodered.org/t/need-to-write-one-function-that-will-return-3-values/30931)._
