UNO R4 not working

My Arduino uno r4 isn't working with wifi when I have uploaded the code from templates and have connected it to an external power source

Please post a sketch that does not work for you and describe what happens when you upload it

This is my code.`/*
Sketch generated by the Arduino IoT Cloud Thing "Cloud Blink"

Arduino IoT Cloud Variables description

The following variables are automatically generated and updated when changes are made to the Thing

bool led;

Variables which are marked as READ/WRITE in the Cloud Thing will also have functions
which are called when their values are changed from the Dashboard.
These functions are generated with the Thing and added at the end of this sketch.
*/

#include "thingProperties.h"

void setup() {
// Initialize serial and wait for port to open:
Serial.begin(9600);
// This delay gives the chance to wait for a Serial Monitor without blocking if none is found
delay(1000);

// Defined in thingProperties.h
initProperties();

// Connect to Arduino IoT Cloud
ArduinoCloud.begin(ArduinoIoTPreferredConnection);

/*
The following function allows you to obtain more information
related to the state of network and IoT Cloud connection and errors
the higher number the more granular information you’ll get.
The default is 0 (only errors).
Maximum is 4
*/
setDebugMessageLevel(2);
ArduinoCloud.printDebugInfo();
pinMode(LED_BUILTIN, OUTPUT);
}

void loop() {
ArduinoCloud.update();
digitalWrite(LED_BUILTIN, led);
}

/*
Since Led is READ_WRITE variable, onLedChange() is
executed every time a new value is received from IoT Cloud.
*/
void onLedChange() {
Serial.print("Led status changed:");
Serial.println(led);
}

Please first carry out these steps:

  1. Do complete Uninstall Arduino IDE and then re-install the Arduino IDE (use Arduino IDE 2.3.2). Make sure that you install all the dependencies that shows up after the installation. If your machine is running Windows 11, grant the IDE admin right during installation.

  2. Install your board's Package Core, it contains the board's driver.

  3. Use a good quality data USB cable to connect the board to the computer without anything connected or wired to the board. Charging/bad USB cable will make it impossible for your computer to detect your board.

  4. Make sure you select the board and the port it is connected to before uploading a sketch.

  5. If #1-4 above fails to solve it, double tap the reset button fast and check the status of the onboard "L" LED. If the onboard LED fade in and out slowly (pulsating), upload an example sketch (Blink LED) from the IDE to the board.

Which template code did you upload and can you uplaod a screenshot of the error message here?

If using the cloud, do step #5 above ( upoad Blink LED sketch ) before doing all the steps above with the IDE. You need to use 2.4Ghz wifi that the SSID and password is not too long and does not have special characters.

I'm using Arduino Cloud. Also, I'm using the template Cloud Blink

can you give more details on why it doesn't work? does it work after the template is uploaded? have you double check the WiFi credentials?

I have double-checked the creditials but it dosen work when i connect it to an external power supply.It work when i use my computer to power it.

What are the characteristics of this power supply? Are the lights on the board on? or most likely you have a while (!Serial) in your code?