We use cookies and other technologies on this website to enhance your user experience.
By clicking any link on this page you are giving your consent to our Privacy Policy and Cookies Policy.

このarduino_wifi_pcsについて

Arduino Wi-Fi UI

ArduinoボードにWi-Fiモジュールを装着し、携帯電話から見たアプリを操作して携帯電話とArduinoの間にWi-Fi通信を接続し、携帯電話に装備されている10個のボタンを押して、そのボタンの押下をArduinoで認識して希望の動作を許可するアプリ

- シングルボタン:10個

(各ボタンを押したときにArduinoに送信されるデータ)

ボタン1:「0」(16進数30)ボタン2:「1」(16進数31)

ボタン3:「2」(16進数32)ボタン4:「3」(16進数33)

ボタン5:「4」(16進数34)ボタン6:「5」(16進数35)

ボタン7:「6」(16進数36)ボタン8:「7」(16進数37)

ボタン9:「8」(16進数38)ボタン10:「9」(16進数39)

(Aduinoのプログラム例)

Arduinoのデジタルポート5番に接続されているLEDをボタン1を1回押すと点灯し、もう一度押すと消灯します。

///// Wi-FiでLEDを制御する

最初の部分にSoftwareSerial.hをインクルードします。

SoftwareSerial esp8266(2,3);

void setup()

{

Serial.begin(9600);

esp8266.begin(9600); // espのボーレート

pinMode(5、OUTPUT);

digitalWrite(、LOW);

sendData("AT+RST\r\n",2000); // モジュールのリセット

sendData("AT+CWMODE=2\r\n",1000); // AP(アクセスポイント)に設定

sendData("AT+CIFSR\r\n",1000); // ipアドレスを取得

sendData("AT+CIPMUX=1\r\n",1000); // multiple connection に設定

sendData("AT+CIPSERVER=1,80\r\n",1000); // port 80でサーバー on

}

void loop()

{

if(esp8266.available()) // esp がメッセージを送信している場合

{

if(esp8266.find("+IPD,"))

{

delay(200); //すべてのシリアルデータリード

int connectionId = esp8266.read();

esp8266.find("?");

int Number = esp8266.read();

if(Number==0x30){

if(digitalRead(5)==HIGH) digitalWrite(5, LOW);

else digitalWrite(5, HIGH);

}

// closeコマンド

String closeCommand = "AT+CIPCLOSE=";

closeCommand += connectionId; // connection idを付ける

closeCommand += "\r\n";

sendData(closeCommand、1000); // close connection

}

}

}

String sendData(String command, const int timeout)

{

String response = "";

esp8266.print(command); // 読み取った文字を esp8266 に転送

long int time = millis();

while( (time+timeout) > millis())

{

while(esp8266.available())

{

// espに受信データがある場合はシリアルに送信

char c = esp8266.read(); //次の文字を読む

response + = c;

}

}

return response;

}

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

Last updated on 2022年11月17日

Minor bug fixes and improvements. Install or update to the newest version to check it out!

翻訳中...

アプリの追加情報

最終のバージョン

arduino_wifi_pcs 更新を申請する 1.1.0

Android 要件

7.0

Available on

arduino_wifi_pcs をPlayストアでダウンロード

もっと見る

arduino_wifi_pcs スクリーンショット

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