Arduino Nano ESP32 - factory demo sketch

Is it possible to find a demo sketch preloaded to Nano ESP32 somewhere?

Does the Nano ESP32 come with a demo sketch loaded beyond the normal Blink sketch ?

Yes, NANO ESP32 blink rgb led too.

Hi @adatat_73. I don't know about the sketch, but there is some information about how you can control these LEDs from your sketch here:

https://docs.arduino.cc/tutorials/nano-esp32/cheat-sheet#rgb

Maybe you can make your own sketch that is even cooler than the one that was preloaded on the Nano ESP32.

Yes, but I wanted to upload the default app before returning it to the store.

If the return was authorized based on the understanding that the board had been used then that will not be necessary.

Here is my modification of the demo sketch. It has 7 colors and optional 0ff displaying on the RGB led.

int vDelay = 500;  //Controls blink speed of built in and RGB leds

void setup() {
  // put your setup code here, to run once:
  pinMode(LED_RED, OUTPUT);
  pinMode(LED_GREEN, OUTPUT);
  pinMode(LED_BLUE, OUTPUT);
  pinMode(LED_BUILTIN, OUTPUT);
}

void toggleLED() {
  if (digitalRead(LED_BUILTIN) == LOW){
    digitalWrite(LED_BUILTIN, HIGH);
  }
  else
  {
   digitalWrite(LED_BUILTIN, LOW);
  }
}

void loop() {
  //1
  toggleLED();
  digitalWrite(LED_RED, LOW);
  digitalWrite(LED_GREEN, LOW);
  digitalWrite(LED_BLUE, LOW);

  delay(vDelay);
//2
 toggleLED();
  digitalWrite(LED_RED, LOW);
  digitalWrite(LED_GREEN, LOW);
  digitalWrite(LED_BLUE, HIGH);

  delay(vDelay);
  //3
  toggleLED();
  digitalWrite(LED_RED, LOW);
  digitalWrite(LED_GREEN, HIGH);
  digitalWrite(LED_BLUE, LOW);

  delay(vDelay);
  //4
 toggleLED();
  digitalWrite(LED_RED, HIGH);
  digitalWrite(LED_GREEN, LOW);
  digitalWrite(LED_BLUE, LOW);

  delay(vDelay);
  //5
  toggleLED();
  digitalWrite(LED_RED, HIGH);
  digitalWrite(LED_GREEN, HIGH);
  digitalWrite(LED_BLUE, LOW);

  delay(vDelay);
  //6
 toggleLED();
  digitalWrite(LED_RED, HIGH);
  digitalWrite(LED_GREEN, LOW);
  digitalWrite(LED_BLUE, HIGH);

   delay(vDelay);
   //7
  toggleLED();
  digitalWrite(LED_RED, LOW);
  digitalWrite(LED_GREEN, HIGH);
  digitalWrite(LED_BLUE, HIGH);

  delay(vDelay);
  //8  Turns RGB LED completely Off
  /*
 toggleLED();
  digitalWrite(LED_RED, HIGH);
  digitalWrite(LED_GREEN, HIGH);
  digitalWrite(LED_BLUE, HIGH);
  
  delay(vDelay);
 */
  //toggleLED();
}

Thanks for sharing @Datacom1!

Yours is definitely cooler, but to provide an update about the original request, I'll mention the Nano ESP32 documentation now includes a sketch that provides the out of the box LED behavior:

https://docs.arduino.cc/tutorials/nano-esp32/cheat-sheet/#default-sketch

I reiterate my statement from earlier in the discussion that this sketch is not required for, and not intended to be used for, purposes of making returns of purchased Nano ESP32 boards. However, it might be of interest to Nano ESP32 owners who would like to understand the code that produced that behavior they saw when they first got their board.