@thrasher Sorry for my bad writing.
So I want to use 2 piece of PZEM for my project and I test PZEM that connect to UART2 it can send value to monitor with speed 115200 and then I test to PZEM that connect to UART0 it not show any value excpet "NaN" from my monitor. how can I fix this?
N
Latest posts made by nikza5566
-
RE: M5Core problem with UART0
-
M5Core problem with UART0
I use PZEM V4.0 for my project, so I want to use it for 2 and I connect to TXRXD0,TXRXD2 and this is my code.
#include <PZEM004Tv30.h> PZEM004Tv30 pzem(&Serial); PZEM004Tv30 pzem2(&Serial2); void setup() { Serial.begin(115200); Serial.print("Reset Energy"); pzem.resetEnergy(); pzem2.resetEnergy(); Serial.print("Set address to 0x42"); pzem.setAddress(0x42); pzem2.setAddress(0x42); } void loop() { float cur = pzem.current(); Serial.print("Current: "); Serial.print(cur); Serial.println("A"); float cur2 = pzem2.current(); Serial.print("Current 2: "); Serial.print(cur2); Serial.println("A"); delay(1000); }
The result is not showing the value of UART0 (pin GPIO1,3).
How can I fix this?