Problem with Arduino WiFi Uno R4

Sorry fot the stupid questions: I must have done something to my Arduino Uno WiFi R4:

  • I have lost the "heart" at the beginning, it does not show any more

  • Once I load any program I have the following red lines

Erase flash

Done in 0.001 seconds
Write 55600 bytes to flash (14 pages)
[==============================] 100% (14/14 pages)
Done in 3.345 seconds

and then nothing works till I press the reset button. The yellow led fades in and out.

Thanks a lot and sorry for hte bother

Federico Carminati

@federicocarminati
Welcome to the Arduino Forum.
Have you tried by uploading a simple code like the blink program?
Is the arduino receiving sufficient power?

The heart was part of the default code sketch, once you load a new program on it, unless you have the heart code in the sketch you upload onto the board, it will not automatically show. Here is the default sketch from Arduino Docs if you want to restore the default sketch to the board (You may need to install libraries):

#include "Arduino_LED_Matrix.h"
#include <stdint.h>

ArduinoLEDMatrix matrix;

const uint32_t frames[][4] = {
  {
    0xe0000000,
    0x0,
    0x0,
    66
  },
  {
    0x400e0000,
    0x0,
    0x0,
    66
  },
  {
    0x400e0,
    0x0,
    0x0,
    66
  },
  {
    0x40,
    0xe000000,
    0x0,
    66
  },
  {
    0x3000000,
    0x400e000,
    0x0,
    66
  },
  {
    0x3003000,
    0x400e,
    0x0,
    66
  },
  {
    0x3003,
    0x4,
    0xe00000,
    66
  },
  {
    0x3,
    0x300000,
    0x400e00,
    66
  },
  {
    0x0,
    0x300300,
    0x400e00,
    66
  },
  {
    0x1c000000,
    0x300,
    0x30400e00,
    66
  },
  {
    0x401c000,
    0x0,
    0x30430e00,
    66
  },
  {
    0x401c,
    0x0,
    0x430e30,
    66
  },
  {
    0x4,
    0x1c00000,
    0x430e30,
    66
  },
  {
    0x0,
    0x401c00,
    0x430e30,
    66
  },
  {
    0x800000,
    0x401,
    0xc0430e30,
    66
  },
  {
    0x800800,
    0x0,
    0x405f0e30,
    66
  },
  {
    0x800800,
    0x80000000,
    0x470ff0,
    66
  },
  {
    0x800800,
    0x80080000,
    0x470ff0,
    66
  },
  {
    0x800,
    0x80080080,
    0x470ff0,
    66
  },
  {
    0x38000000,
    0x80080080,
    0x8470ff0,
    66
  },
  {
    0x10038000,
    0x80080,
    0x8478ff0,
    66
  },
  {
    0x10038,
    0x80,
    0x8478ff8,
    66
  },
  {
    0x700010,
    0x3800080,
    0x8478ff8,
    66
  },
  {
    0x400700,
    0x1003880,
    0x8478ff8,
    66
  },
  {
    0x400,
    0x70001083,
    0x88478ff8,
    66
  },
  {
    0xf000000,
    0x40070081,
    0x87f8ff8,
    66
  },
  {
    0xf000,
    0x400f1,
    0x87f8ff8,
    66
  },
  {
    0x8000000f,
    0xc1,
    0xf7f8ff8,
    66
  },
  {
    0xc0080000,
    0xf00081,
    0xc7ffff8,
    66
  },
  {
    0x400c0080,
    0xf81,
    0x87fcfff,
    66
  },
  {
    0x3400c0,
    0x8000081,
    0xf87fcfff,
    66
  },
  {
    0x20200340,
    0xc008081,
    0xf87fcfff,
    66
  },
  {
    0x38220200,
    0x3400c089,
    0xf87fcfff,
    66
  },
  {
    0x38220,
    0x2003408d,
    0xf8ffcfff,
    66
  },
  {
    0x86100038,
    0x220240bd,
    0xf8ffcfff,
    66
  },
  {
    0xec186100,
    0x38260ad,
    0xfbffcfff,
    66
  },
  {
    0x3ec186,
    0x100078af,
    0xfaffffff,
    66
  },
  {
    0x114003ec,
    0x186178af,
    0xfaffffff,
    66
  },
  {
    0x3b411400,
    0x3ec1febf,
    0xfaffffff,
    66
  },
  {
    0x143b411,
    0x4ec3febf,
    0xfbffffff,
    66
  },
  {
    0xc040143b,
    0x4fd7febf,
    0xfbffffff,
    66
  },
  {
    0xc60c0439,
    0x4ff7ffff,
    0xfbffffff,
    66
  },
  {
    0x33c60f9,
    0x4ff7ffff,
    0xffffffff,
    66
  },
  {
    0x3cbc33ff,
    0x4ff7ffff,
    0xffffffff,
    66
  },
  {
    0x8ffbff,
    0x7ff7ffff,
    0xffffffff,
    66
  },
  {
    0xf0cffbff,
    0xfff7ffff,
    0xffffffff,
    66
  },
  {
    0xfe1fffff,
    0xffffffff,
    0xffffffff,
    66
  },
  {
    0xffffffff,
    0xffffffff,
    0xffffffff,
    66
  },
  {
    0x7fffffff,
    0xffffffff,
    0xfffff7ff,
    66
  },
  {
    0x3fe7ffff,
    0xffffffff,
    0xff7ff3fe,
    66
  },
  {
    0x1fc3fe7f,
    0xfffffff7,
    0xff3fe1fc,
    66
  },
  {
    0xf81fc3f,
    0xe7ff7ff3,
    0xfe1fc0f8,
    66
  },
  {
    0x500f81f,
    0xc3fe3fe1,
    0xfc0f8070,
    66
  },
  {
    0x500f,
    0x81fc1fc0,
    0xf8070020,
    66
  },
  {
    0x5,
    0xf80f80,
    0x70020000,
    66
  },
  {
    0x5,
    0xa80880,
    0x50020000,
    600
  },
  {
    0xd812,
    0x41040880,
    0x50020000,
    200
  },
  {
    0x5,
    0xa80880,
    0x50020000,
    0xFFFFFFFF
  }
};

void setup() {
  Serial.begin(115200);
  // you can also load frames at runtime, without stopping the refresh
  matrix.loadSequence(frames);
  matrix.begin();
  // turn on autoscroll to avoid calling next() to show the next frame; the parameter is in milliseconds
  // matrix.autoscroll(300);
  matrix.play(true);
  pinMode(LED_BUILTIN, OUTPUT);
}

void loop() {
  digitalWrite(LED_BUILTIN, HIGH);
  delay(1000);
  digitalWrite(LED_BUILTIN, LOW);
  delay(1000);
}

As far as the red lines go, those lines show the code has uploaded and is not an error.

When does the yellow Led fade in and out? During the upload, after the upload, when you press the reset button? During an upload, or when you press the reset button twice quickly, it is normal for the yellow led to fad in and out, any other times it fades in and out would be part of your code: What code are you using?

Hello,
Thanks! It is quite messy… I select the Arduino UNO R4 WiFi board and the ARM CMSIS-DAP compatible programmer. Two problems:

  • The led matrix does not switch on with the beating heart (it used to)

  • I have the following output and the sketch starts only when I press the reset button.

/Users/fca/Library/Arduino15/packages/arduino/hardware/renesas_uno/1.3.2/cores/arduino/cm_backtrace/cm_backtrace.c: In function 'cm_backtrace_init':
/Users/fca/Library/Arduino15/packages/arduino/hardware/renesas_uno/1.3.2/cores/arduino/cm_backtrace/cm_backtrace.c:144:13: warning: assignment discards 'const' qualifier from pointer target type [-Wdiscarded-qualifiers]
fw_name = firmware_name;
^
/Users/fca/Library/Arduino15/packages/arduino/hardware/renesas_uno/1.3.2/cores/arduino/cm_backtrace/cm_backtrace.c:145:12: warning: assignment discards 'const' qualifier from pointer target type [-Wdiscarded-qualifiers]
hw_ver = hardware_ver;
^
/Users/fca/Library/Arduino15/packages/arduino/hardware/renesas_uno/1.3.2/cores/arduino/cm_backtrace/cm_backtrace.c:146:12: warning: assignment discards 'const' qualifier from pointer target type [-Wdiscarded-qualifiers]
sw_ver = software_ver;
^
/Users/fca/Library/Arduino15/packages/arduino/hardware/renesas_uno/1.3.2/cores/arduino/tinyusb/rusb2/dcd_rusb2.c: In function 'wait_pipe_fifo_empty':
/Users/fca/Library/Arduino15/packages/arduino/hardware/renesas_uno/1.3.2/cores/arduino/tinyusb/rusb2/dcd_rusb2.c:289:3: warning: 'return' with a value, in function returning void
TU_ASSERT(num);
^~~~~~~~~
/Users/fca/Library/Arduino15/packages/arduino/hardware/renesas_uno/1.3.2/cores/arduino/tinyusb/rusb2/dcd_rusb2.c:288:13: note: declared here
static void wait_pipe_fifo_empty(rusb2_reg_t* rusb, uint8_t num) {
^~~~~~~~~~~~~~~~~~~~
Sketch uses 52240 bytes (19%) of program storage space. Maximum is 262144 bytes.
Global variables use 6744 bytes (20%) of dynamic memory, leaving 26024 bytes for local variables. Maximum is 32768 bytes.
Erase flash

Done in 0.001 seconds
Write 52248 bytes to flash (13 pages)
[==============================] 100% (13/13 pages)
Done in 3.074 seconds

Federico Carminati
av Ste Cécile 29
1217 Meyrin
Switzerland/Suisse
Tel: +41797732246

Thanks a lot! THe yellow led fades in and out after the code is successfully loaded. Then nothing happens till I press the button. Then the program starts. I am using Blink. Best,

Thanks again. Your code works, but again not unless I press the reset button. Otherwise the yellow led keeps fading in and out and nothing happens. Best

@federicocarminati

Would reccomend taking this 1 step at a time.

Firstly, as explained earlier, the Heart beat on the matrix was loaded from the factory. Once another sketch is loaded, that is gone. Should you want it, it is available in the examples folder of Uno R4 WiFi.

If you like, in the IDE you can go to file/examples/ then under the heading Examples for Arduino R4 WiFi scroll to LED_Matrix and hover over it to expand that library, then scroll to Matrixintro and click on that.

A new IDE window will appear and the sketch will load. Be sure you are connected to your Uno R4 WiFi board and select the proper com port, then click the upload button. This will give you a sketch that plays a tetris type drop of LEDs then the heart.

That would be a check if the board loads code and plays. If not, you may have other issues.

Diagnosis is a step by step process, starting with the simple stuff.

Hope this helps.