Persistent Uploading Loop Issue with Arduino after using PPM library for RC reading

I'm encountering a persistent issue with my Arduino board where it seems to be stuck in a continuous uploading loop. Here are the details of the problem:

I'm using an Arduino Uno WiFi Rev2 board.

#include <PPMReader.h>

// Initialize a PPMReader on digital pin 3 with 6 expected channels.
byte pin = 2;
byte channelAmount = 4;
PPMReader ppm(pin, channelAmount);

void setup() {
  Serial.begin(9600);
}

void loop() {
  // Print latest valid values from all channels
  for (byte channel = 1; channel <= channelAmount; ++channel) {
    unsigned value = ppm.latestValidChannelValue(channel, 0);
    Serial.print(value);
    if (channel < channelAmount) Serial.print('\t');
  }
  Serial.println();
  delay(20);
}

I uploaded a code that reads PPM signals using the "PPMReader" library. The code prints PPM channel values to the Serial Monitor.
After uploading the code, the board continuously prints PPM channel values to the Serial Monitor. The problem is that I can't upload any new code, and the board doesn't respond to reset attempts or disconnections.
I've tried disconnecting the board, pressing the reset button, and clearing the serial buffer, but the behavior persists.
I tried the same code on a different Arduino board, and it exhibited the same behavior, suggesting that the issue might be related to the code or external factors.

I'm looking for assistance in identifying the root cause of this issue and finding a solution. I would appreciate any insights, suggestions, or troubleshooting steps that could help resolve the continuous uploading loop and allow me to upload new code to the Arduino.

Thank you in advance for your help!

Root cause of this issue is occupying a serial port for continuous data transfer.
AVR mcu use the same serial port to flash new code, so heavy traffic interferes with the process.
Why do you need to print PPM values so frequently? It is a quite impossibly to human eye to read the values, changed every 20 ms.
Try to change delay at the end of loop to something like 200-300 ms

Thanks :slight_smile:
noob mistake

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.