void func(int num, ...) {
  va_list valist;                      // создание
  va_start(valist, num);               // инициализация
  for (int i = 0; i < num; i++) {
    Serial.print(va_arg(valist, int)); // доступ
    Serial.print(',');
  }
  va_end(valist);                      // очистка
  Serial.println();
}
void setup() {
  // put your setup code here, to run once:
  Serial.begin(115200);
  Serial.println("Hello, ESP32!");
  func(3, 3, 4, 5);
}
void loop() {
  // put your main code here, to run repeatedly:
  delay(10); // this speeds up the simulation
}