diff --git a/SampleSrc/_filememo.txt b/SampleSrc/_filememo.txt index 2f1db8d..c663eb1 100644 --- a/SampleSrc/_filememo.txt +++ b/SampleSrc/_filememo.txt @@ -8,9 +8,9 @@ cds01.ino :green:: 照度(明るさ)センサ do_nothing.ino ::: なにもしないプログラム。これをコピーすると新規作成できる。 env2.ino :green:: 温度・湿度センサ (要 外部モジュールENV.II) -espnow01.ino :blue:: ESPNOW通信 -espnow02.ino :blue:: ESPNOW通信 -espnow03.ino :blue:: ESPNOW通信 +espnow01.ino :blue:: ESPNOW通信(数値の配列) +espnow02.ino :blue:: ESPNOW通信(数値の配列:条件によって受信処理) +espnow03.ino :blue:: ESPNOW通信(float,double,charをbyte配列にして送信) factorytest.ino ::: x gasunit.ino :green:: CO2・ガスセンサ httpclient01.ino :#f09:: Web Client @@ -24,7 +24,7 @@ mqtt01sub.ino :#f09:: MQTT Subscribe ntp01.ino ::: Network Time Protocolで時刻取得 ota01.ino ::: x -pref01.ino :#90f:: A/B/Powerボタンと電源OFF,再起動 +pref01.ino :#90f:: A/B/Powerボタンと電源OFF,再起動,内部メモリ pwm01.ino ::: LEDの調光 PWM(Pulse Width Modulation)制御 regexp01.ino ::: 正規表現と辞書クラス rtc01.ino ::: 内蔵時計(RealTimeClock) diff --git a/SampleSrc/espnow01.ino b/SampleSrc/espnow01.ino index f151ce3..5a351d2 100644 --- a/SampleSrc/espnow01.ino +++ b/SampleSrc/espnow01.ino @@ -15,7 +15,7 @@ Serial.println(status == ESP_NOW_SEND_SUCCESS ? "Delivery Success" : "Delivery Fail"); // 画面にも描画 M5.Lcd.fillScreen(BLACK); - M5.Lcd.setCursor(0, 0); + M5.Lcd.setCursor(0, 0, 2); M5.Lcd.print("Last Packet Sent to: \n "); M5.Lcd.println(macStr); M5.Lcd.print("Last Packet Send Status: \n "); @@ -37,7 +37,7 @@ Serial.println(""); // 画面にも描画 M5.Lcd.fillScreen(BLACK); - M5.Lcd.setCursor(0, 0); + M5.Lcd.setCursor(0, 0, 2); M5.Lcd.print("Last Packet Recv from: \n "); M5.Lcd.println(macStr); M5.Lcd.printf("Last Packet Recv Data(%d): \n ", data_len); @@ -52,6 +52,7 @@ M5.begin(115200); M5.Lcd.fillScreen(BLACK); M5.Lcd.setRotation(3); + M5.Lcd.setCursor(0, 0, 2); M5.Lcd.print("ESP-NOW Test\n"); // ESP-NOW初期化 WiFi.mode(WIFI_STA); @@ -89,7 +90,7 @@ // ボタンを押したら送信 if (M5.BtnA.wasPressed()) { - uint8_t data[2] = {123, 234}; + uint8_t data[2] = {123, 234}; // 送信するデータ esp_err_t result = esp_now_send(slave.peer_addr, data, sizeof(data)); Serial.print("Send Status: "); if (result == ESP_OK) @@ -125,3 +126,4 @@ } +