Switch from Arduino Uno R3 to Arduino R4 wifi and code not working anymore

Hello,

I'm working on code for a project, for the moment I'm just trying to make a code that lights up my LED strip with a little animation.

I buyed an Arduino® UNO R4 WiFi because I'll need wifi later on.

Here is my code:

#include <Adafruit_NeoPixel.h>

#define PIN        5
#define NUM_LEDS   12

Adafruit_NeoPixel strip = Adafruit_NeoPixel(NUM_LEDS, PIN, NEO_GRB + NEO_KHZ800);

void setup() {
  strip.begin();
  strip.show(); // Initialize all pixels to 'off'
}

void loop() {
  // Set all pixels to red
  colorWipe(strip.Color(255, 0, 0), 50); // Red, 50 ms delay
}

void colorWipe(uint32_t color, int wait) {
  for(int i=0; i<strip.numPixels(); i++) {
    strip.setPixelColor(i, color);
    strip.show();
    delay(wait);
  }
}

I tested it on Thinkercad and in real life with an Arduino Uno R3 and it work. But when I try to use it with the arduino uno R4 it doesn't work, nothing happens, I manage to upload the code but the LED strip don't light up.

it's not a connection or soldering problem.

Does anyone have a solution?

No, it's not a connection or soldering problem, it's an "the R4 is not an improved R3, it's a completely different beast that happens to share the same physical footprint as an R3 but is incompatible with it in so many ways" problem.

There's an outstanding pull request to add support for the Uno R4 to the Adafruit_NeoPixel library. It's only a few minutes work to update the one file that needs to be changed. I can verify that it works.

There i disagree.

No i mean that 'overall' FastLED is not a better library.

Those who use R4 do not need better library in overall, they have enough a library that works :slight_smile:

By in my opinion the Fastled has its own advantages/