Navigation

    M5Stack Community

    • Register
    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    1. Home
    2. nikza5566
    N
    • Continue chat with nikza5566
    • Start new chat with nikza5566
    • Flag Profile
    • Profile
    • Following
    • Followers
    • Blocks
    • Topics
    • Posts
    • Best
    • Groups
    Save
    Saving

    nikza5566

    @nikza5566

    0
    Reputation
    2
    Posts
    1083
    Profile views
    0
    Followers
    0
    Following
    Joined Last Online

    nikza5566 Follow

    Posts made by nikza5566

    • RE: M5Core problem with UART0

      @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?

      posted in General
      N
      nikza5566
    • 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?

      posted in General
      N
      nikza5566