Our website uses necessary cookies to enable basic functions and optional cookies to help us to enhance your user experience. Learn more about our cookie policy by clicking "Learn More".
Accept All Only Necessary Cookies
GUI Maker for ESP8266 & ESP32 - Python Inst. Panel アイコン

GUI Maker for ESP8266 & ESP32 - Python Inst. Panel


RapidNack.com
1.2.5
  • 2018年06月10日
    Update date
  • Everyone
  • Android 4.1+
    Android OS

このGUI Maker for ESP8266 & ESP32 - Python Inst. Panelについて

ESP8266、ESP-WROOM-32(ESP32)用の操作パネルを短時間で作ることができます。

このアプリケーションの目的は?

ボタン、タイマー、グラフ等を配置し処理をIron Pythonで記述することで、ESP8266、ESP32用の操作パネルを短時間で作ることができます。

ESP8266、ESP32に書き込むべきプログラムは?

Arduinoスケッチ http://rapidnack.com/?p=835

操作説明ー画面 http://rapidnack.com/?p=918

操作説明ーグラフ http://rapidnack.com/?p=945

SampleーColor LED http://rapidnack.com/?p=967

SampleーTemp & Humidity http://rapidnack.com/?p=987

SampleーPush Switch http://rapidnack.com/?p=1017

AD9851 DDSモジュール http://rapidnack.com/?p=1164

上記Arduinoスケッチを、ESPに書き込んでください。ESPとAndroidを接続してボタン、スライダー等を操作すると、アプリ画面のログに表示される内容と同じものがArduino IDEのシリアルモニタに表示されます。

アプリ画面にタイマーとグラフを追加してArduinoスケッチを測定データを返信するように変更すれば、リアルタイムで測定データをグラフ表示できます。Arduinoスケッチの最後にあるmySetup()、myLoop()、process()に独自の処理を追加します。

void mySetup() {

}

void myLoop() {

}

String process(String str) {

    Serial.println(str);

    //if (str == "Button1: Button1")

    // return "Received!";

    return "";

}

ESP8266、ESP32と通信するには?

ESPからデータを取得する場合は、次のようにPythonで記述します。

if Remote.Writer != None:

    Remote.Writer.WriteLine()

    Remote.Writer.Flush()

    print Remote.Reader.ReadLine()

また、次のようにイベントハンドラlineReceived(text)をPanel setup scriptに記述すると、ESPからのデータを非同期で処理できます。

def lineReceived(text):

    print text

Remote.RaiseEvents = True

以下は、ESP-WROOM-32用のサンプルスケッチです。

ESP8266の場合はInclude文を差替えてください。

ESP8266:

    #include <ESP8266WiFi.h>

    #include <WiFiClient.h>

ESP-WROOM-32:

    #include <WiFi.h>

----------------------------------- ここから -----------------------------------

#include <WiFi.h>

const char* ssid = "your-ssid";

const char* password = "your-password";

WiFiServer server(2002);

WiFiClient client;

String process(String str);

void setup() {

  Serial.begin(57600);

  mySetup();

  Serial.println();

  Serial.print("Connecting to ");

  Serial.println(ssid);

  //WiFi.mode(WIFI_STA);  // Disable Access Point

  WiFi.begin(ssid, password);

  while (WiFi.status() != WL_CONNECTED) {

    delay(500);

    Serial.print(".");

  }

  Serial.println("");

  Serial.println("WiFi connected"); 

  Serial.println("IP address: ");

  Serial.println(WiFi.localIP());

  server.begin();

  Serial.println("Server started");

}

void loop() {

  myLoop();

  if (!client.connected()) {

    // try to connect to a new client

    client = server.available();

  } else {

    // read data from the connected client

    if (client.available()) {

      String inputString = client.readStringUntil('\n');

      inputString.trim();

      String outputString = process(inputString);

      if (outputString != "") {

        client.println(outputString);       

      }

    }

  }

}

void mySetup() {

}

void myLoop() {

}

String process(String str) {

  Serial.println(str);

  //if (str == "Button1: Button1")

  //  return "Received!";

  return "";

}

----------------------------------- ここまで -----------------------------------

もっと見る

アプリの追加情報

最終のバージョン

1.2.5

投稿者

Ketsaraporn Deeratsamee

Android 要件

Android 4.1+

コンテンツのレーティング

Everyone

最新バージョン 1.2.5 の更新情報

Last updated on 2018年06月10日

Changed to save contents when exiting edit mode

もっと見る

GUI Maker for ESP8266 & ESP32 - Python Inst. Panel スクリーンショット

GUI Maker for ESP8266 & ESP32 - Python Inst. Panel ポスターGUI Maker for ESP8266 & ESP32 - Python Inst. Panel スクリーンショット 1GUI Maker for ESP8266 & ESP32 - Python Inst. Panel スクリーンショット 2GUI Maker for ESP8266 & ESP32 - Python Inst. Panel スクリーンショット 3GUI Maker for ESP8266 & ESP32 - Python Inst. Panel スクリーンショット 4GUI Maker for ESP8266 & ESP32 - Python Inst. Panel スクリーンショット 5GUI Maker for ESP8266 & ESP32 - Python Inst. Panel スクリーンショット 6GUI Maker for ESP8266 & ESP32 - Python Inst. Panel スクリーンショット 7

関連タグ

24 時間人気記事

APKPureをを購読する
最高のAndroidゲームアプリの最新リリースやニュースやガイドなどの情報にいち早くアクセスすることができます。
いいえ結構です
購読
購読完了!
APKPureの購読が完了しました。