diff --git a/src/TestBuild/TestBuild.ino b/src/TestBuild/TestBuild.ino index dde2180..4149c43 100644 --- a/src/TestBuild/TestBuild.ino +++ b/src/TestBuild/TestBuild.ino @@ -1,32 +1,15 @@ -#include -#include - -const char* ssid = "**********"; -const char* password = "**********"; +int PIN = 10; // 赤色LED G10 +//int PIN = 9; // Ir LED (カメラには映りますが、肉眼では見えません) G9 +// その他、G0 (0) , G25 (25), G26 (26) がつかえます。 +// https://lang-ship.com/blog/work/m5stickc-io/ void setup() { - M5.begin(); - M5.Lcd.setRotation(3); - M5.Lcd.fillScreen(ORANGE); - M5.Lcd.setCursor(10, 50, 4); - - WiFi.begin(ssid, password); // 接続開始 - while (WiFi.status() != WL_CONNECTED) { // 接続中... - M5.Beep.tone(2000); delay(200); - M5.Beep.mute(); delay(300); - M5.Lcd.print("."); - } - // 接続完了!! - M5.Beep.tone(4000); - M5.Lcd.fillScreen(GREEN); - M5.Lcd.setCursor(0, 40, 4); - M5.Lcd.setTextColor(BLACK, GREEN); - M5.Lcd.print(" Wifi Connected!\n "); - String gotip = WiFi.localIP().toString(); // m5デバイスのIPアドレス - M5.Lcd.println(gotip); - delay(1500); - M5.Beep.mute(); + pinMode(PIN, OUTPUT); // PINのモード設定 } void loop() { + digitalWrite(PIN, HIGH); // HIGH = 1 + delay(1000); + digitalWrite(PIN, LOW); // LOW = 0 + delay(500); } \ No newline at end of file diff --git a/src/TestBuild/build/esp32.esp32.m5stick-c/TestBuild.ino.bin b/src/TestBuild/build/esp32.esp32.m5stick-c/TestBuild.ino.bin index b001929..6ae298b 100644 --- a/src/TestBuild/build/esp32.esp32.m5stick-c/TestBuild.ino.bin +++ b/src/TestBuild/build/esp32.esp32.m5stick-c/TestBuild.ino.bin Binary files differ diff --git a/src/TestBuild/build/esp32.esp32.m5stick-c/TestBuild.ino.elf b/src/TestBuild/build/esp32.esp32.m5stick-c/TestBuild.ino.elf index a60580d..8f1d485 100755 --- a/src/TestBuild/build/esp32.esp32.m5stick-c/TestBuild.ino.elf +++ b/src/TestBuild/build/esp32.esp32.m5stick-c/TestBuild.ino.elf Binary files differ diff --git a/src/Upload.sh b/src/Upload.sh new file mode 100755 index 0000000..f485e30 --- /dev/null +++ b/src/Upload.sh @@ -0,0 +1,32 @@ +#!/bin/bash + +ary=() + +for i in *.ino ; do + ary+=("$i") +done + +for i in ${!ary[@]} ; do + echo "$i : ${ary[$i]}" +done + +echo -n "Input num for build&upload (q:quit) > " +read input + +if [[ "$input" == "q" ]]; then + exit +fi + +if [ -n "${ary[$input]}" ]; then + echo "$input : ${ary[$input]}" + file=${ary[$input]} + cp ${file} TestBuild/TestBuild.ino + cd TestBuild + ./compile.sh && ./upload.sh + cd .. +else + echo "Sorry, ${input} is not found." +fi + + +