void setup() {
// put your setup code here, to run once:
Serial.begin(115200);
Serial.println("Hello, ESP32!");
}
void loop() {
// put your main code here, to run repeatedly:
// Declare and initialize the character array with a null terminator
char greeting[] = "Hello, world!\0";
// Use a loop to iterate through each character of the array
// The loop continues until it hits the null terminator '\0'
for (int i = 0; greeting[i] != '\0'; i++) {
// Print each character of the array to the Serial monitor
Serial.print(greeting[i]);
delay(500); // to make it obvious it is printing char by char
}
// Print a newline after the greeting
Serial.println();
// Wait for a second before repeating the loop
delay(1000);
}