Skip to content

Commit 486c44d

Browse files
authored
Update SerialESPPassthrough.ino - formatting
1 parent 37fff98 commit 486c44d

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

Adafruit_ESP32_Arduino_Demos/SerialESPPassthrough/SerialESPPassthrough.ino

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -129,12 +129,18 @@ void setup() {
129129

130130
void loop() {
131131
while (Serial.available()) {
132-
pixel.setPixelColor(0, 10, 0, 0); if(pixel.canShow()) pixel.show();
132+
if(pixel.canShow()) {
133+
pixel.setPixelColor(0, 10, 0, 0);
134+
pixel.show();
135+
}
133136
SerialESP32.write(Serial.read());
134137
}
135138

136139
while (SerialESP32.available()) {
137-
pixel.setPixelColor(0, 0, 0, 10); if(pixel.canShow()) pixel.show();
140+
if(pixel.canShow()) {
141+
pixel.setPixelColor(0, 0, 0, 10);
142+
pixel.show();
143+
}
138144
Serial.write(SerialESP32.read());
139145
}
140146
}

0 commit comments

Comments
 (0)