🤖Have you ever tried Chat.M5Stack.com before asking??😎
    M5Stack Community
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Register
    • Login

    M5CoreInk Serial2 Issue I don't understand

    Units
    1
    2
    2.1k
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • H
      HappyUser
      last edited by

      Dear all, I am using dsmr.h te read out my smart meter at home. Reading is done through Serial2. Just as in the dsmr example, the declaration of the reader is like this :
      #define RX_PIN 13 // read
      #define TX_PIN 14 // Transmit
      #define Read_PIN 26 //33 //23
      P1Reader reader(&Serial2, Read_PIN);
      On my M5Core2 reading out the serial2 interface with above setting works great. Now I have transported the software to M5CoreInk. Same cable, same pin settings. I don't see any readings anymore. So I checked in a simple loop while(Serial2.available())
      {
      int ch = Serial2.read();
      Serial.write(ch);
      }
      to see if any data is coming in. And I see on my terminal that the data is exactly what I suspect.
      Now my question is, is there something with Serial2 that works differently on M5CoreInk than on M5Core2 that somehow effects the dsmr constructs using P1Reader reader(&Serial2, Read_PIN);
      The software works on M5Core2, on M5CoreInk the data is coming in, but suddenly not anymore using this reader construct. Any suggestions?

      1 Reply Last reply Reply Quote 0
      • H
        HappyUser
        last edited by

        Oh I forgot, and this is how the Serial2 is initiated (MrCore2 and M5CoreInk) : Serial2.begin(115200, SERIAL_8N1, RX_PIN, TX_PIN,true); // Serial2.begin(9600, SERIAL_8N1, RX_PIN, TX_PIN); //Serial port 2 initialization
        delay(300);

        1 Reply Last reply Reply Quote 0
        • First post
          Last post