Ubuntu 24.10 上の Arduino IDE 2.3.4 を使います。
./arduino-ide_2.3.4_Linux_64bit.AppImage --no-sandbox
ボードは、
ESP32 Dev Module
です。
hello_world.ino
// ---------------------------------------------------------------------
/*
hello_world.ino
Jan/28/2025
*/
// ---------------------------------------------------------------------
#define PROGRAM "hellow_world.ino"
#define VERSION "2025-01-28 PM 16:47"
int count = 0;
// ---------------------------------------------------------------------
void setup()
{
Serial.begin(115200);
delay(1000);
Serial.println("*** start ***");
delay(1000);
Serial.println(PROGRAM);
Serial.println(VERSION);
Serial.println("*** setup end ***");
}
// ---------------------------------------------------------------------
void loop()
{
Serial.println(PROGRAM);
Serial.println(VERSION);
Serial.println("Hello World! " + String(count));
delay(1000);
Serial.println("Good Morning! " + String(count));
delay(1000);
Serial.println("こんにちは " + String(count));
Serial.println();
delay(3000);
count++;
}
// ---------------------------------------------------------------------
ターミナルで接続した結果
$ cu -l /dev/ttyUSB0 -s 115200
Connected.
Good Morning! 63
こんにちは 63
hellow_world.ino
2025-01-28 PM 16:47
Hello World! 64
Good Morning! 64
こんにちは 64
hellow_world.ino
2025-01-28 PM 16:47
Hello World! 65
Good Morning! 65
こんにちは 65
M5Core2
実行結果
$ cu -l /dev/ttyUSB0 -s 115200
Connected.
hellow_world.ino
2025-01-28 PM 16:47
Hello World! 11
Good Morning! 11
こんにちは 11
hellow_world.ino
2025-01-28 PM 16:47
Hello World! 12
Good Morning! 12
こんにちは 12
hellow_world.ino
2025-01-28 PM 16:47
Hello World! 13
Good Morning! 13
こんにちは 13