Help with simple loop

hi guys im trying to make one input turn on for my first led and the other input for the led to flash but my code does not seem to work for the flashing one.
im using an esp32 with an Bluetooth app

if (rxValue.length() > 0) {
Serial.println("*********");
Serial.print("Received Value: ");

for (int i = 0; i < rxValue.length(); i++) {
Serial.print(rxValue*);*

  • }*

  • Serial.println();*

  • if (rxValue.find(“A”) != -1) {*

  • Serial.print(“Turning ON!”);*

  • digitalWrite(LED, HIGH);*

  • loop();{*

  • digitalWrite(LED2, HIGH);*

  • delay(100); *

  • digitalWrite(LED2, LOW); *

  • delay(100);}*

  • }*

  • else if (rxValue.find(“B”) != -1) {*

  • Serial.print(“Turning OFF!”);*

  • digitalWrite(LED, LOW);*

  • digitalWrite(LED2, LOW);*

  • }*

  • Serial.println();*
    _ Serial.println("*********");_

  • }*

  • }*
    };
    ESP32_BLE_UART_Demo.ino (3.89 KB)

You have loop(); that should be while() i think.

typematrix: You have loop(); that should be while() i think.

No each sketch must have a loop function.

each sketch must have a loop function.

and every sketch posted here should be in code tags otherwise some of it may turn into italics

Grumpy_Mike: No each sketch must have a loop function.

I know but if you download his file and look at full code you see the Loop() and setup() are else where.

Yes I saw that, you were suggesting he used a while instead of a loop.

typematrix: You have loop(); that should be while() i think.