/////////////////////////////////////////////////////////////////
/*
  ESP32CAM | Android(Flutter App) Wired Communication - Baud Rate Test [1/2]
  https://youtu.be/Mod9gX7NWA8
  Created by Eric N. (ThatProject)
*/
/////////////////////////////////////////////////////////////////

//String base64ImageDummyQVGA = "[encoded data, 7320 characters]";
//String base64ImageDummyVGA = "[encoded data, 17260 characters]";
//String base64ImageDummySVGA = "[encoded data, 23660 characters]";
//String base64ImageDummyXGA = "[encoded data, 34132 characters]";
//String base64ImageDummySXGA = "[encoded data, 50616 characters]";
//String base64ImageDummyUXGA = "[encoded data, 68032 characters]";
String hello = "hello\n";

void setup() {
  Serial.begin(2000000);
}

void loop() {

  Serial.write(hello.c_str(), hello.length());    
  delay(1000);

  //Serial.write(base64ImageDummyQVGA.c_str(), base64ImageDummyQVGA.length());       
  //Serial.println();
  //delay(20); // chunk cut
  //delay(60); // ok

  //Serial.write(base64ImageDummyVGA.c_str(), base64ImageDummyVGA.length());       
  //Serial.println();
  //delay(50); //chunk cut
  //delay(60); //chunk cut
  //delay(70); //ok

  //Serial.write(base64ImageDummySVGA.c_str(), base64ImageDummySVGA.length());       
  //Serial.println();
  //delay(80); //ok

  //Serial.write(base64ImageDummyXGA.c_str(), base64ImageDummyXGA.length());       
  //Serial.println();
  //delay(80); //chunk cut
  //delay(100); //ok

  //Serial.write(base64ImageDummySXGA.c_str(), base64ImageDummySXGA.length());       
  //Serial.println();
  //delay(100); //chunk cut
  //delay(110); //ok

  //Serial.write(base64ImageDummyUXGA.c_str(), base64ImageDummyUXGA.length());       
  //Serial.println();
  //delay(1000); //N/A
}
