M5CoreInk Serial2 Issue I don't understand
-
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? -
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);
Hello! It looks like you're interested in this conversation, but you don't have an account yet.
Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.
With your input, this post could be even better 💗
Register Login