diff --git a/SampleSrc/TestBuild/compile.sh b/SampleSrc/TestBuild/compile.sh index ec6a064..aa75950 100755 --- a/SampleSrc/TestBuild/compile.sh +++ b/SampleSrc/TestBuild/compile.sh @@ -1,8 +1,5 @@ #!/bin/bash - -# arduino-cli compile --fqbn esp32:esp32:m5stick-c --export-binaries M5StickCPlus_FactoryTest2022.ino - # get folder name, and set to [dir] variable. dir=${PWD##*/} arduino-cli compile --fqbn esp32:esp32:m5stick-c --export-binaries ${dir}.ino diff --git a/SampleSrc/analogread.ino b/SampleSrc/analogread.ino index e85f840..d36d051 100644 --- a/SampleSrc/analogread.ino +++ b/SampleSrc/analogread.ino @@ -25,3 +25,4 @@ + diff --git a/SampleSrc/button01.ino b/SampleSrc/button01.ino index 99d3a87..bd3f7b5 100644 --- a/SampleSrc/button01.ino +++ b/SampleSrc/button01.ino @@ -1,25 +1,41 @@ #include +#define USE_DISPLAY true void setup() { M5.begin(115200); M5.Lcd.setRotation(3); + displayMessage("Press any key and Release."); } void loop() { M5.update(); // 各ボタンの状態を(読み取って)更新する:ボタンを判定するときは必須。 if (M5.BtnA.wasReleasefor(1000) ) { - Serial.println("[A] was Pressed longer than 1s"); + displayMessage("[A] was Pressed longer than 1s"); } else if (M5.BtnA.wasReleased()) { - Serial.println("[A] was Pressed"); + displayMessage("[A] was Pressed"); } else if (M5.BtnB.wasReleasefor(1000) ) { - Serial.println("[B] was Pressed longer than 1s"); + displayMessage("[B] was Pressed longer than 1s"); } else if (M5.BtnB.wasReleased()) { - Serial.println("[B] was Pressed"); + displayMessage("[B] was Pressed"); } else if (M5.Axp.GetBtnPress() == 2) { - Serial.println("[Power] was Pressed"); + displayMessage("[Power] was Pressed"); } + delay(10); } +void displayMessage(const char* mes){ + Serial.println(mes); + + #if USE_DISPLAY + M5.Lcd.fillScreen( ORANGE ); + M5.Lcd.setCursor(0, 0, 2); + M5.Lcd.setTextSize(2); + M5.Lcd.setTextColor( WHITE, OLIVE ); + M5.Lcd.printf(" %s ", mes); + #endif +} + + diff --git a/SampleSrc/cds01.ino b/SampleSrc/cds01.ino index 0c61a64..f80706d 100644 --- a/SampleSrc/cds01.ino +++ b/SampleSrc/cds01.ino @@ -38,3 +38,11 @@ } + + + + + + + + diff --git a/SampleSrc/led01.ino b/SampleSrc/led01.ino index 02af0d9..87fa6ef 100644 --- a/SampleSrc/led01.ino +++ b/SampleSrc/led01.ino @@ -49,3 +49,5 @@ + + diff --git a/SampleSrc/ntp01.ino b/SampleSrc/ntp01.ino index ccda88a..c731a5c 100644 --- a/SampleSrc/ntp01.ino +++ b/SampleSrc/ntp01.ino @@ -31,3 +31,4 @@ delay(1000); } + diff --git a/SampleSrc/serial01.ino b/SampleSrc/serial01.ino index 007db49..96ce0b8 100644 --- a/SampleSrc/serial01.ino +++ b/SampleSrc/serial01.ino @@ -14,3 +14,4 @@ delay(500); // 500ミリ秒待つ } } + diff --git a/setup.sh b/setup.sh index e0d7e99..082cc3c 100755 --- a/setup.sh +++ b/setup.sh @@ -31,4 +31,7 @@ # Finally, just show board list +echo "(for Windows user) 書き込みは主にUSBで行いますので、ネットワークアクセスの許可は、しなくてもよいです。" +echo "(for Windows user) Acceptance of Network setting is not mandatory." + arduino-cli board list