Skip to content

Commit

Permalink
fix(matter): serial print instead of log_i
Browse files Browse the repository at this point in the history
  • Loading branch information
SuGlider authored Jan 11, 2025
1 parent a81e2d4 commit 6f54d48
Showing 1 changed file with 12 additions and 5 deletions.
17 changes: 12 additions & 5 deletions libraries/Matter/examples/MatterMinimum/MatterMinimum.ino
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,8 @@ bool onOffLightCallback(bool state) {
}

void setup() {
Serial.begin(115200);

// Initialize the USER BUTTON (Boot button) that will be used to decommission the Matter Node
pinMode(buttonPin, INPUT_PULLUP);
// Initialize the LED GPIO
Expand All @@ -63,9 +65,14 @@ void setup() {
// Manually connect to WiFi
WiFi.begin(ssid, password);
// Wait for connection
Serial.println();
Serial.print("Connecting to");
Serial.println(ssid);
while (WiFi.status() != WL_CONNECTED) {
Serial.print('.');
delay(500);
}
Serial.println();

// Initialize at least one Matter EndPoint
OnOffLight.begin();
Expand All @@ -77,11 +84,11 @@ void setup() {
Matter.begin();

if (!Matter.isDeviceCommissioned()) {
log_i("Matter Node is not commissioned yet.");
log_i("Initiate the device discovery in your Matter environment.");
log_i("Commission it to your Matter hub with the manual pairing code or QR code");
log_i("Manual pairing code: %s\r\n", Matter.getManualPairingCode().c_str());
log_i("QR code URL: %s\r\n", Matter.getOnboardingQRCodeUrl().c_str());
Serial.println("Matter Node is not commissioned yet.");
Serial.println("Initiate the device discovery in your Matter environment.");
Serial.println("Commission it to your Matter hub with the manual pairing code or QR code");
Serial.printf("Manual pairing code: %s\r\n", Matter.getManualPairingCode().c_str());
Serial.printf("QR code URL: %s\r\n", Matter.getOnboardingQRCodeUrl().c_str());
}
}

Expand Down

0 comments on commit 6f54d48

Please sign in to comment.