Arduino Nano 33 IoT not receiving serial data from Serial1 port

I have an Arduino Nano 33 IoT that uses the Blynk.Edgent MKR1010 example as template from the v1.0.1 release (which is consistent with the library I have installed).

Everything is working fine except there is one thing I can’t seem to figure out. I’d like to send and receive serial data using the Tx and Rx pins associated with the Serial1 port (pins 1 and 2 on the board).

I’m able to send data perfectly, but I run into trouble when trying to read incoming data. NOTE: I am not writing anything to any virtual pins, so I don’t believe it is an issue related to flooding the Blynk server requests. Also, I’m almost certain it’s not an issue with the hardware itself because I’m able to use the same Serial1.read() function without Blynk and that also works perfectly.

Is there anything in the Blynk library that might be redefining something related to the Serial1 port, causing it to miss incoming data? Or is it an issue with how I’m structuring my code?

I wrote a test helper function to check if data was coming into the board without actually reading the data:

void setup(){
    //Serial.begin(115200);
    Serial1.begin(115200);
    delay(2000);
    pinMode(13, OUTPUT);
    BlynkEdgent.begin();
}

void loop(){
    BlynkEdgent.run();
    ReadSerial();
}

void ReadSerial(){
    if (Serial1.available() > 0){
        digitalWrite(13, HIGH);
    }
}

The LED never turns on, and I’ve tried a similar test where instead of using an LED, I used the Serial Monitor and print statements and do attempt to read the data unlike my code above, but that also did not indicate that any data was being received.

Any insight would be greatly appreciated.

pin 13 is Serial1 RX

Are you saying that Rx is reassigned to pin 13 by Blynk? Otherwise, I am using the correct pins. Perhaps the Tx and Rx pins are not called pins 1 and 2, but I am referring to the pins with the Tx and Rx labels on the physical board. Both the variant.cpp file and my experiments without Blynk have confirmed that those pins correspond to Serial1 (SERCOM5). I was able to receive data using Serial1 (Rx pin) without anything Blynk related in the sketch.

sorry I was checking MKR1010 pinout.

Blynk.Edgent configures pin 0 for button. see Settings.h

Yes, that was it! Thank you!