No serial data received esp32-cam fdti programmer

Hey,

I saw these videos Arduino IDE + ESP32 CAM | ESP32-CAM Capture and Send Photos to Telegram | Plus with PIR Sensor - YouTube ESP32 Cam Motion Alert | Send Image to Telegram - YouTube where you made a detection system where you could let a telegram bot send images to you that were detected by your pir-sensor and esp32-cam and i dont know why but i keep getting the same message no serial data received i tried every forum or place with the same problem and nothing worked in the video they use ai thinker i use esp32-cam s version does it matter also they use in arduino ide -> tools programmer many choices but i can only choose esptool how do they get the other options? hope someone can help need this for school
Thank You,
Abdul

As your query does not relate directly to the operation of the IDE it has been moved to the Programming category of the forum

Please post your sketch here, using code tags when you do

In my experience the easiest way to tidy up the code and add the code tags is as follows

Start by tidying up your code by using Tools/Auto Format in the IDE to make it easier to read. Then use Edit/Copy for Forum and paste what was copied in a new reply. Code tags will have been added to the code to make it easy to read in the forum thus making it easier to provide help.

Hi @abdul12345678910.

Did you make the connection between the "IO0" and "GND" pins as shown at this point in the second video?:

https://youtu.be/v36c7-s3jvA?si=5lIO3zU3z-dy4aiH&t=130

I'm going to ask you to post the full verbose output from an upload attempt.


:exclamation: This procedure is not intended to solve the problem. The purpose is to gather more information.


Please do this:

  1. Select File > Preferences... (or Arduino IDE > Settings... for macOS users) from the Arduino IDE menus.
    The "Preferences" dialog will open.
  2. Uncheck the box next to Show verbose output during: compilation in the "Preferences" dialog.
  3. Check the box next to Show verbose output during: ☐ upload.
  4. Click the "OK" button.
    The "Preferences" dialog will close.
  5. Attempt an upload, as you did before.
  6. Wait for the upload to fail.
  7. You will see a "Upload error: ..." notification at the bottom right corner of the Arduino IDE window. Click the "COPY ERROR MESSAGES" button on that notification.
  8. Open a forum reply here by clicking the "Reply" button.
  9. Click the <CODE/> icon on the post composer toolbar.
    This will add the forum's code block markup (```) to your reply to make sure the error messages are correctly formatted.
    Code block icon on toolbar
  10. Press the Ctrl+V keyboard shortcut (Command+V for macOS users).
    This will paste the error output from the upload into the code block.
  11. Move the cursor outside of the code block markup before you add any additional text to your reply.
  12. Click the "Reply" button to post the output.

No.

Please post a link to the exact timestamp in the video when they use that.

It shouldn't matter. The Tools > Programmer menu selection is only used when you are doing Tools > Burn Bootloader or "Upload Using Programmer". When you're doing a standard "Upload", the Tools > Programmer menu selection is completely ignored. So it makes no difference at all what you have selected from the Tools > Programmer menu.

Hey I have done the exact steps Tools/Auro Format and Edit/Copy for Forum let me know if u are able to help with this is is my first code with how I cabled the esp32-cam with my Ftdi Programmer with this code [code]
// Viral Science www.viralsciencecreativity.com www.youtube.com/c/viralscience
// ESP32 Cam Motion Alert | Send Image to Telegram

// Enter your WiFi ssid and password
const char* ssid = "---------"; //WIFI SSID
const char* password = "---------"; //WIFI password
String token = "-----------------------------";
String chat_id = "-------";

#include <WiFi.h>
#include <WiFiClientSecure.h>
#include "soc/soc.h"
#include "soc/rtc_cntl_reg.h"
#include "esp_camera.h"

//CAMERA_MODEL_AI_THINKER
#define PWDN_GPIO_NUM 32
#define RESET_GPIO_NUM -1
#define XCLK_GPIO_NUM 0
#define SIOD_GPIO_NUM 26
#define SIOC_GPIO_NUM 27
#define Y9_GPIO_NUM 35
#define Y8_GPIO_NUM 34
#define Y7_GPIO_NUM 39
#define Y6_GPIO_NUM 36
#define Y5_GPIO_NUM 21
#define Y4_GPIO_NUM 19
#define Y3_GPIO_NUM 18
#define Y2_GPIO_NUM 5
#define VSYNC_GPIO_NUM 25
#define HREF_GPIO_NUM 23
#define PCLK_GPIO_NUM 22

int gpioPIR = 13; //PIR Motion Sensor

void setup()
{
WRITE_PERI_REG(RTC_CNTL_BROWN_OUT_REG, 0);

Serial.begin(115200);
delay(10);
WiFi.mode(WIFI_STA);
Serial.println("");
Serial.print("Connecting to ");
Serial.println(ssid);
WiFi.begin(ssid, password);
long int StartTime = millis();
while (WiFi.status() != WL_CONNECTED)
{
delay(500);
if ((StartTime + 10000) < millis()) break;
}

Serial.println("");
Serial.println("STAIP address: ");
Serial.println(WiFi.localIP());
Serial.println("");

if (WiFi.status() != WL_CONNECTED) {
Serial.println("Reset");

ledcAttachPin(4, 3);
ledcSetup(3, 5000, 8);
ledcWrite(3, 10);
delay(200);
ledcWrite(3, 0);
delay(200);
ledcDetachPin(3);
delay(1000);
ESP.restart();

}
else
{
ledcAttachPin(4, 3);
ledcSetup(3, 5000, 8);
for (int i = 0; i < 5; i++) {
ledcWrite(3, 10);
delay(200);
ledcWrite(3, 0);
delay(200);
}
ledcDetachPin(3);
}

camera_config_t config;
config.ledc_channel = LEDC_CHANNEL_0;
config.ledc_timer = LEDC_TIMER_0;
config.pin_d0 = Y2_GPIO_NUM;
config.pin_d1 = Y3_GPIO_NUM;
config.pin_d2 = Y4_GPIO_NUM;
config.pin_d3 = Y5_GPIO_NUM;
config.pin_d4 = Y6_GPIO_NUM;
config.pin_d5 = Y7_GPIO_NUM;
config.pin_d6 = Y8_GPIO_NUM;
config.pin_d7 = Y9_GPIO_NUM;
config.pin_xclk = XCLK_GPIO_NUM;
config.pin_pclk = PCLK_GPIO_NUM;
config.pin_vsync = VSYNC_GPIO_NUM;
config.pin_href = HREF_GPIO_NUM;
config.pin_sscb_sda = SIOD_GPIO_NUM;
config.pin_sscb_scl = SIOC_GPIO_NUM;
config.pin_pwdn = PWDN_GPIO_NUM;
config.pin_reset = RESET_GPIO_NUM;
config.xclk_freq_hz = 20000000;
config.pixel_format = PIXFORMAT_JPEG;

if (psramFound())
{
config.frame_size = FRAMESIZE_VGA;
config.jpeg_quality = 10; //0-63 lower number means higher quality
config.fb_count = 2;
}
else
{
config.frame_size = FRAMESIZE_QQVGA;
config.jpeg_quality = 12; //0-63 lower number means higher quality
config.fb_count = 1;
}

// camera init
esp_err_t err = esp_camera_init(&config);
if (err != ESP_OK)
{
Serial.printf("Camera init failed with error 0x%x", err);
delay(1000);
ESP.restart();
}

sensor_t * s = esp_camera_sensor_get();
s->set_framesize(s, FRAMESIZE_XGA);

}

void loop()
{

pinMode(gpioPIR, INPUT_PULLUP);
int v = digitalRead(gpioPIR);
Serial.println(v);
if (v == 1)
{
alerts2Telegram(token, chat_id);
delay(10000);
}
delay(1000);

}

String alerts2Telegram(String token, String chat_id)
{
const char* myDomain = "api.telegram.org";
String getAll = "", getBody = "";

camera_fb_t * fb = NULL;
fb = esp_camera_fb_get();
if (!fb)
{
Serial.println("Camera capture failed");
delay(1000);
ESP.restart();
return "Camera capture failed";
}

WiFiClientSecure client_tcp;

if (client_tcp.connect(myDomain, 443))
{
Serial.println("Connected to " + String(myDomain));

String head = "--India\r\nContent-Disposition: form-data; name=\"chat_id\"; \r\n\r\n" + chat_id + "\r\n--India\r\nContent-Disposition: form-data; name=\"photo\"; filename=\"esp32-cam.jpg\"\r\nContent-Type: image/jpeg\r\n\r\n";
String tail = "\r\n--India--\r\n";

uint16_t imageLen = fb->len;
uint16_t extraLen = head.length() + tail.length();
uint16_t totalLen = imageLen + extraLen;

client_tcp.println("POST /bot" + token + "/sendPhoto HTTP/1.1");
client_tcp.println("Host: " + String(myDomain));
client_tcp.println("Content-Length: " + String(totalLen));
client_tcp.println("Content-Type: multipart/form-data; boundary=India");
client_tcp.println();
client_tcp.print(head);

uint8_t *fbBuf = fb->buf;
size_t fbLen = fb->len;


for (size_t n = 0; n < fbLen; n = n + 1024)
{

  if (n + 1024 < fbLen)
  {
    client_tcp.write(fbBuf, 1024);
    fbBuf += 1024;
  }
  else if (fbLen % 1024 > 0)
  {
    size_t remainder = fbLen % 1024;
    client_tcp.write(fbBuf, remainder);
  }
}

client_tcp.print(tail);

esp_camera_fb_return(fb);

int waitTime = 10000;   // timeout 10 seconds
long startTime = millis();
boolean state = false;

while ((startTime + waitTime) > millis())
{
  Serial.print(".");
  delay(100);
  while (client_tcp.available())
  {
    char c = client_tcp.read();
    if (c == '\n')
    {
      if (getAll.length() == 0) state = true;
      getAll = "";
    }
    else if (c != '\r')
      getAll += String(c);
    if (state == true) getBody += String(c);
    startTime = millis();
  }
  if (getBody.length() > 0) break;
}
client_tcp.stop();
Serial.println(getBody);

}
else {
getBody = "Connection to telegram failed.";
Serial.println("Connection to telegram failed.");
}

return getBody;
}

[/code]

This link is for my other setup to test if my esp32-cam is broken and it still got the error no serial data received with this one

#include "esp_camera.h"
#include <WiFi.h>

//
// WARNING!!! PSRAM IC required for UXGA resolution and high JPEG quality
//            Ensure ESP32 Wrover Module or other board with PSRAM is selected
//            Partial images will be transmitted if image exceeds buffer size
//
//            You must select partition scheme from the board menu that has at least 3MB APP space.
//            Face Recognition is DISABLED for ESP32 and ESP32-S2, because it takes up from 15
//            seconds to process single frame. Face Detection is ENABLED if PSRAM is enabled as well

// ===================
// Select camera model
// ===================
//#define CAMERA_MODEL_WROVER_KIT // Has PSRAM
#define CAMERA_MODEL_ESP_EYE // Has PSRAM
//#define CAMERA_MODEL_ESP32S3_EYE // Has PSRAM
//#define CAMERA_MODEL_M5STACK_PSRAM // Has PSRAM
//#define CAMERA_MODEL_M5STACK_V2_PSRAM // M5Camera version B Has PSRAM
//#define CAMERA_MODEL_M5STACK_WIDE // Has PSRAM
//#define CAMERA_MODEL_M5STACK_ESP32CAM // No PSRAM
//#define CAMERA_MODEL_M5STACK_UNITCAM // No PSRAM
//#define CAMERA_MODEL_AI_THINKER // Has PSRAM
//#define CAMERA_MODEL_TTGO_T_JOURNAL // No PSRAM
//#define CAMERA_MODEL_XIAO_ESP32S3 // Has PSRAM
// ** Espressif Internal Boards **
//#define CAMERA_MODEL_ESP32_CAM_BOARD
//#define CAMERA_MODEL_ESP32S2_CAM_BOARD
//#define CAMERA_MODEL_ESP32S3_CAM_LCD
//#define CAMERA_MODEL_DFRobot_FireBeetle2_ESP32S3 // Has PSRAM
//#define CAMERA_MODEL_DFRobot_Romeo_ESP32S3 // Has PSRAM
#include "camera_pins.h"

// ===========================
// Enter your WiFi credentials
// ===========================
const char* ssid = "**********";
const char* password = "**********";

void startCameraServer();
void setupLedFlash(int pin);

void setup() {
  Serial.begin(115200);
  Serial.setDebugOutput(true);
  Serial.println();

  camera_config_t config;
  config.ledc_channel = LEDC_CHANNEL_0;
  config.ledc_timer = LEDC_TIMER_0;
  config.pin_d0 = Y2_GPIO_NUM;
  config.pin_d1 = Y3_GPIO_NUM;
  config.pin_d2 = Y4_GPIO_NUM;
  config.pin_d3 = Y5_GPIO_NUM;
  config.pin_d4 = Y6_GPIO_NUM;
  config.pin_d5 = Y7_GPIO_NUM;
  config.pin_d6 = Y8_GPIO_NUM;
  config.pin_d7 = Y9_GPIO_NUM;
  config.pin_xclk = XCLK_GPIO_NUM;
  config.pin_pclk = PCLK_GPIO_NUM;
  config.pin_vsync = VSYNC_GPIO_NUM;
  config.pin_href = HREF_GPIO_NUM;
  config.pin_sccb_sda = SIOD_GPIO_NUM;
  config.pin_sccb_scl = SIOC_GPIO_NUM;
  config.pin_pwdn = PWDN_GPIO_NUM;
  config.pin_reset = RESET_GPIO_NUM;
  config.xclk_freq_hz = 20000000;
  config.frame_size = FRAMESIZE_UXGA;
  config.pixel_format = PIXFORMAT_JPEG; // for streaming
  //config.pixel_format = PIXFORMAT_RGB565; // for face detection/recognition
  config.grab_mode = CAMERA_GRAB_WHEN_EMPTY;
  config.fb_location = CAMERA_FB_IN_PSRAM;
  config.jpeg_quality = 12;
  config.fb_count = 1;

  // if PSRAM IC present, init with UXGA resolution and higher JPEG quality
  //                      for larger pre-allocated frame buffer.
  if (config.pixel_format == PIXFORMAT_JPEG) {
    if (psramFound()) {
      config.jpeg_quality = 10;
      config.fb_count = 2;
      config.grab_mode = CAMERA_GRAB_LATEST;
    } else {
      // Limit the frame size when PSRAM is not available
      config.frame_size = FRAMESIZE_SVGA;
      config.fb_location = CAMERA_FB_IN_DRAM;
    }
  } else {
    // Best option for face detection/recognition
    config.frame_size = FRAMESIZE_240X240;
#if CONFIG_IDF_TARGET_ESP32S3
    config.fb_count = 2;
#endif
  }

#if defined(CAMERA_MODEL_ESP_EYE)
  pinMode(13, INPUT_PULLUP);
  pinMode(14, INPUT_PULLUP);
#endif

  // camera init
  esp_err_t err = esp_camera_init(&config);
  if (err != ESP_OK) {
    Serial.printf("Camera init failed with error 0x%x", err);
    return;
  }

  sensor_t * s = esp_camera_sensor_get();
  // initial sensors are flipped vertically and colors are a bit saturated
  if (s->id.PID == OV3660_PID) {
    s->set_vflip(s, 1); // flip it back
    s->set_brightness(s, 1); // up the brightness just a bit
    s->set_saturation(s, -2); // lower the saturation
  }
  // drop down frame size for higher initial frame rate
  if (config.pixel_format == PIXFORMAT_JPEG) {
    s->set_framesize(s, FRAMESIZE_QVGA);
  }

#if defined(CAMERA_MODEL_M5STACK_WIDE) || defined(CAMERA_MODEL_M5STACK_ESP32CAM)
  s->set_vflip(s, 1);
  s->set_hmirror(s, 1);
#endif

#if defined(CAMERA_MODEL_ESP32S3_EYE)
  s->set_vflip(s, 1);
#endif

  // Setup LED FLash if LED pin is defined in camera_pins.h
#if defined(LED_GPIO_NUM)
  setupLedFlash(LED_GPIO_NUM);
#endif

  WiFi.begin(ssid, password);
  WiFi.setSleep(false);

  while (WiFi.status() != WL_CONNECTED) {
    delay(500);
    Serial.print(".");
  }
  Serial.println("");
  Serial.println("WiFi connected");

  startCameraServer();

  Serial.print("Camera Ready! Use 'http://");
  Serial.print(WiFi.localIP());
  Serial.println("' to connect");
}

void loop() {
  // Do nothing. Everything is done in another task by the web server
  delay(10000);
}

The diagram shows the jumper on the FTDI module in the 5 V position:

image

If it is wired this way with the jumper in that position then you exposed the ESP32 microcontroller and other components to 5 V, while they are rated for 3.3 V. This will likely cause permanent damage to the ESP32 and other components, which could definitely be the cause of the upload failure. If so, you will need to replace the damaged ESP32-CAM.

Hey ptillisch,
Yes, I made that connection if u look here
438083807_1190936688587912_5770930474439914437_n
and I then connected my FTDI Programmer to my computer, and it showed the errors even though i connected everything like it should, has it something to do with that the code contains ESP32-cam AI thinker while I have the normal version?
the box for show verbose output is unchecked already before my upload attempt or should it normally stay with a checked box for compilation?
and i will reply again with the error copy

Wait what? What 5v the diagram show they are both connected to 3.3V that's what u meant right? and that failure i got also the first time i used the 3.3 volt if i were to use 5 volt i would have used this diagram


only here i used 5v and this was after many failures with the fdti and my esp32-cam can still light up it's white light when i press the reset button idk if that matters what do u think?

Also, this is my error `Arduino: 1.8.19 (Windows Store 1.8.57.0) (Windows 10), Board: "ESP32 Wrover Module, Huge APP (3MB No OTA/1MB SPIFFS), QIO, 80MHz, 921600, None, Disabled"

Sketch uses 1468449 bytes (46%) of program storage space. Maximum is 3145728 bytes.

Global variables use 60292 bytes (18%) of dynamic memory, leaving 267388 bytes for local variables. Maximum is 327680 bytes.

esptool.py v4.5.1

Serial port COM3

Connecting......................................

A fatal error occurred: Failed to connect to ESP32: No serial data received.

For troubleshooting steps visit: Troubleshooting - ESP32 - — esptool.py latest documentation

the selected serial port For troubleshooting steps visit: Troubleshooting - ESP32 - — esptool.py latest documentation

does not exist or your board is not connected

This report would have more information with
"Show verbose output during compilation"
option enabled in File -> Preferences.
`

In which position was the voltage selector jumper on the FTDI module? I can't see it in your picture. I'm referring to the thing I circled in blue here:

There are three pins on the voltage selector header. If the jumper is shorting the pin marked "5V" with the central pin of the header, then the module outputs 5 V on the VCC pin and also uses 5 V I/O levels. If the jumper is shorting the pin marked "3.3V" with the central pin of the header, then the module outputs 3.3 V on the VCC pin and also uses 3.3 V I/O levels.

The diagram of the FTDI module connections to the ESP32-CAM shows the "VCC" pin on the FTDI module connected to the "3V3" pin on the ESP32-CAM. They put a "VCC=3.3 V" label next to the "VCC" pin on the FTDI module, but that is only true if the jumper on the voltage selector header on the module is in the 3.3V position. In the picture, the jumper is in the 5V position, in which case the label is incorrect and the VCC pin on the FTDI module is instead outputting 5 V, not 3.3 V.

Here is my attempt its uploaded to a yt video since i cant paste it directly here https://www.youtube.com/watch?v=TykjGUj3U58
https://www.youtube.com/watch?v=6vM-B3-X8GU

We're talking about hardware now. The situation with Arduino IDE is already clear.

So ye the problem is with the hardware? Okay well u can see here a better picture focus on the colours it should absolutely have the same wiring as in the diagram.
438137464_7751347328244548_94208488423266326_n

Also, i didn't know about voltage selector jumper on the FTDI module i am not sure how i can change the vcc between 5v and 3.3v how can i tell what VCC I set it ?

Update i think i know what u mean if i place a jumper on the 5v it gives 5v on the vcc and same for 3.3 but i didnt place any jumper there so it means my computers gives power to my esp32-cam right? Is my cam still fried because of this or are there any other mistakes I should know about before working with a newly ordered esp32-cam?

I'm not sure exactly what happens in this case. I tried it and found that the voltage on the VCC pin of the FTDI module was only 1.2 V when I attempted to power the ESP32-CAM from it. The ESP32-CAM won't work when powered at such a low voltage so this could definitely explain the upload failure. The voltage on the VCC pin went up to the expected ~3.3 V once I connected a jumper between the "3.3V" pin and the center pin on the FTDI module's voltage selector header.

Please connect a jumper between the "3.3V" pin and the center pin on your FTDI module's voltage selector header. The module should have come with a little plastic-encased jumper for this purpose:

image

If you don't have that jumper, you can use a female to female jumper wire instead. Something like this:

📷

Female/Female jumper wire. by oomlout - CC by-sa 2.0

I don't think so. The important thing is to avoid exposing it to 5 V. It is also not good to power it at too low a voltage (e.g., 1.2 V), because in this case the 3.3 V logic levels of the FTDI module's TX pin are still too high, but I think the ESP32-CAM probably survived it OK.

Hey I did it again with the jumper going from 3.3 to the middle pin as u can see
436968118_3355335258100974_9006142980651546329_n
but i got another error `Arduino: 1.8.19 (Windows Store 1.8.57.0) (Windows 10), Board: "ESP32 Dev Module, Disabled, Disabled, Default 4MB with spiffs (1.2MB APP/1.5MB SPIFFS), 240MHz (WiFi/BT), QIO, 80MHz, 4MB (32Mb), 921600, Core 1, Core 1, None, Disabled"

Sketch uses 858765 bytes (65%) of program storage space. Maximum is 1310720 bytes.

Global variables use 58980 bytes (17%) of dynamic memory, leaving 268700 bytes for local variables. Maximum is 327680 bytes.

esptool.py v4.5.1

Serial port COM3

Connecting......................................

A fatal error occurred: Failed to connect to ESP32: No serial data received.

For troubleshooting steps visit: Troubleshooting - ESP32 - — esptool.py latest documentation

the selected serial port For troubleshooting steps visit: Troubleshooting - ESP32 - — esptool.py latest documentation

does not exist or your board is not connected

This report would have more information with
"Show verbose output during compilation"
option enabled in File -> Preferences.
` Any idea where this error is coming from? I made the right connections right?

I think I found the problem. On some ESP32-CAM boards, the pin next to the large LED marked "GND" in the diagrams you are using as a reference is not actually a ground pin. My board has this issue and I notice that the pin is labeled "GND/R" instead of just "GND" as shown in your diagrams and other images of ESP32-CAM boards I find online. Contrary to what your diagrams show, if you have one of the non-standard ESP32-CAM boards, you must connect the "GND" pin of the FTDI module to the pin on the ESP32-CAM marked "GND" that is on the other side of the board:

image

So move that wire and then try uploading again. Hopefully this time it will work.

Hey I did move the that GND wire to the other GND on the other side, but it still didn't work, u think it may be a hardware problem like it came broken when i ordered it? But i am afraid it wil still not work this is for school and is important so i ordered a new one in the meantime but u think getting a wroom version will help the situation?

This is the error `Arduino: 1.8.19 (Windows Store 1.8.57.0) (Windows 10), Board: "ESP32 Dev Module, FTDI Adapter, Disabled, Default 4MB with spiffs (1.2MB APP/1.5MB SPIFFS), 240MHz (WiFi/BT), QIO, 80MHz, 4MB (32Mb), 115200, Core 1, Core 1, None, Disabled"

Sketch uses 922185 bytes (70%) of program storage space. Maximum is 1310720 bytes.

Global variables use 49064 bytes (14%) of dynamic memory, leaving 278616 bytes for local variables. Maximum is 327680 bytes.

esptool.py v4.5.1

Serial port COM3

Connecting......................................

A fatal error occurred: Failed to connect to ESP32: No serial data received.

For troubleshooting steps visit: Troubleshooting - ESP32 - — esptool.py latest documentation

the selected serial port For troubleshooting steps visit: Troubleshooting - ESP32 - — esptool.py latest documentation

does not exist or your board is not connected

This report would have more information with
"Show verbose output during compilation"
option enabled in File -> Preferences.
`

hey u think u can still help?

rather than using a FTDI programmer I find it simpler to use a ESP32-CAM-MB micro USB programmer

But what if it still doesn’t work do u think the problem lies elsewhere? In on of the codes i used it states it is for a esp32-cam ai thinker would it matter if i have a esp32-cam s version?

can you load and run a simple program such as blink, e.g.

// blink for ESP32-CAM
// red LED is GPIO 33  flash is GPIO4

#define LED_BUILTIN  33

// the setup function runs once when you press reset or power the board
void setup() {
  // initialize digital pin LED_BUILTIN as an output.
  pinMode(LED_BUILTIN, OUTPUT);
}

// the loop function runs over and over again forever
void loop() {
  digitalWrite(LED_BUILTIN, HIGH);   // turn the LED on (HIGH is the voltage level)
  delay(1000);                       // wait for a second
  digitalWrite(LED_BUILTIN, LOW);    // turn the LED off by making the voltage LOW
  delay(1000);                       // wait for a second
}

This code works for esp32-can s version right because i cant buy ai thinker version anywhere ?