Skip to content

Commit f5c2c06

Browse files
committed
receive-mp3.ino
1 parent ee77c2c commit f5c2c06

File tree

1 file changed

+2
-2
lines changed
  • examples/examples-communication/serial/mp3-custom/receive-mp3

1 file changed

+2
-2
lines changed

examples/examples-communication/serial/mp3-custom/receive-mp3/receive-mp3.ino

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,9 +49,9 @@ void setup() {
4949
task.begin([]() {
5050
copierFill.copy();
5151
// data synchronization to prevent buffer overflow
52-
if (buffer.levelPercent() > max_percent) {
52+
if (buffer.levelPercent() >= max_percent) {
5353
digitalWrite(flowControlPin, HIGH); // stop receiving
54-
} else if (buffer.levelPercent() < min_percent) {
54+
} else if (buffer.levelPercent() <= min_percent) {
5555
digitalWrite(flowControlPin, LOW); // start receiving
5656
}
5757
});

0 commit comments

Comments
 (0)