How to use Cubecell's GPIO Pins?

Hi i’m
having trouble using the GPIO pins on the Cubecells.

this simple sketch doesn’t work.

int LED= 2;

void setup() {
Serial.begin(115200);
pinMode(LED OUTPUT);

}

void loop() {
digitalWrite(LED, HIGH);

delay (500);
digitalWrite(LED,LOW);
delay(500);

}

what am I doing wrong? please help

Try pinMode(LED, OUTPUT);

Cubecell has no “normal” LED. Please use the RGB-Example to use the Onboard-LED!

PIN 2 ist no CubeCell PIN use GPIO2!

thank you so just to be clear. I’m talking about an external LED.

would I do this?

int LED = GPIO2

pinMode(LED,OUTPUT)?

Yes,but be careful with the IO sharing i.e.: ADC/ Lora SPI/I2C/ WS2812 RGB data pin.

#define LED_Pin GPIO2
void setup()
{
pinMode(LED_Pin, OUTPUT); // Initialize the LED_BUILTIN pin as an output
}

void loop()
{
digitalWrite(LED_Pin, LOW); // Turn the LED off
delay(2000);
digitalWrite(LED_Pin, HIGH); // Turn the LED on
delay(5000); // Wait for 5 seconds
}

fantastic thank you that worked