How to flipper dev board LED work ?

I've looked everywhere but I can't find how to display the LED on the ESP32-S2 dev board flipper zero that's designed to display it.
I tried using the Arduino IDE but it doesn't work. If you know how to do this, please explain.

my original code:

#include <Adafruit_NeoPixel.h>

int testPins[] = {0, 2, 15, 18, 21};
int currentTest = 0;

void setup() {
  Serial.begin(115200);
  delay(1000);
  Serial.println("=== test LED RGB ===");
}

void loop() {
  int pin = testPins[currentTest];
  
  Serial.printf("\n--- Test GPIO %d ---\n", pin);
  
  Adafruit_NeoPixel led(1, pin, NEO_GRB + NEO_KHZ800);
  led.begin();
  led.setBrightness(100);
  
  // Red
  Serial.println("Red...");
  led.setPixelColor(0, led.Color(255, 0, 0));
  led.show();
  delay(2000);
  
  // Green
  Serial.println("Green...");
  led.setPixelColor(0, led.Color(0, 255, 0));
  led.show();
  delay(2000);
  
  // Blue
  Serial.println("Blue...");
  led.setPixelColor(0, led.Color(0, 0, 255));
  led.show();
  delay(2000);
  
  // Off
  led.setPixelColor(0, led.Color(0, 0, 0));
  led.show();
  delay(1000);
  
  currentTest++;
  if(currentTest >= 5) {
    currentTest = 0;
    Serial.println("\n=== end, retry ===\n");
    delay(3000);
  }
}

RGB LED Addressable RGB LED, driven by GPIO18.

Where did you get the code from?
What is a flipper dev board?

What exactly was wrong with the Arduino IDE, and which one?

As far as the LED on an ESP32-S2 dev board, the standard test sketch can be found at the following. Make sure you select the board first before trying it.

Security hacking device. Flipper Zero - Wikipedia

1 Like

Hi @loe435 ,

Welcome to the forum..

Looks like they are hooked up to a i2c led controller..

is that you board??

~q

1 Like

Ah yes.

LP5562

Looks like there’s a lib in the Arduino list..

might want to give it a try..

good luck.. ~q

okay i find, tanks so much guys

#define LED_RED     6
#define LED_GREEN   5
#define LED_BLUE    4

void setup() {
  pinMode(LED_RED, OUTPUT);
  pinMode(LED_GREEN, OUTPUT);
  pinMode(LED_BLUE, OUTPUT);
}

void writeColor(uint8_t r, uint8_t g, uint8_t b) {
  analogWrite(LED_RED, 255 - r);   // inversion anode commune
  analogWrite(LED_GREEN, 255 - g);
  analogWrite(LED_BLUE, 255 - b);
}

void loop() {
  writeColor(255, 0, 0); delay(1000);
  writeColor(0, 255, 0); delay(1000);
  writeColor(0, 0, 255); delay(1000);
  writeColor(255, 255, 0); delay(1000);
  writeColor(0, 0, 0); delay(1000);
}