
We provide arduino_wifi_pcs online (apkid: com.arduino.wifi.pcs) in order to run this application in our online Android emulator.
Description:

Run this app named arduino_wifi_pcs using MyAndroid.
You can do it using our Android online emulator.
After mounting the Wi-Fi module on the Arduino board, operating this app on the mobile phone to connect the Wi-Fi communication between the mobile phone and Arduino, pressing the 10 buttons provided on the mobile phone to recognize the pressing of the button on the Arduino to perform the desired operation.
app that allows
- Single button: 10
(Data sent to Arduino when each button is pressed)
Button 1: 0 (hexadecimal 30) Button 2: 1 (hexadecimal 31)
Button 3: 2 (hexadecimal 32) Button 4: 3 (hexadecimal 33)
Button 5: 4 (hexadecimal 34) Button 6: 5 (hexadecimal 35)
Button 7: 6 (hexadecimal 36) Button 8: 7 (hexadecimal 37)
Button 9: 8 (hexadecimal 38) Button 10: 9 (hexadecimal 39)
(Example of program in Arduino)
LED connected to digital port 5 of Arduino turns on when button 1 is pressed once, and turns off when pressed again.
(Toggle action)
///// Controlling LEDs via Wi-Fi
Include SoftwareSerial.h in the first part.
SoftwareSerial esp8266(2,3);
void setup()
{
Serial.
begin(9600);
esp8266.begin(9600); // baud rate of esp
pinMode(5, OUTPUT);
digitalWrite(, LOW);
sendData("AT+RST\r\n",2000); // module reset
sendData("AT+CWMODE=2\r\n",1000); // set as AP (access point)
sendData("AT+CIFSR\r\n",1000); // get ip address
sendData("AT+CIPMUX=1\r\n",1000); // set to multiple connections
sendData("AT+CIPSERVER=1,80\r\n",1000); // server on port 80
}
void loop()
{
if(esp8266.available()) // if esp is sending a message
{
if(esp8266.find("+IPD,"))
{
delay(200); // read all serial data
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 command
String closeCommand = "AT+CIPCLOSE=";
closeCommand += connectionId; // attach connection id
closeCommand += "\r\n";
sendData(closeCommand,1000); // close connection
}
}
}
String sendData(String command, const int timeout)
{
String response = "";
esp8266.print(command); // send read character to esp8266
long int time = millis();
while( (time+timeout) > millis())
{
while(esp8266.available())
{
// If there is received data in esp, send it serially
char c = esp8266.read(); // read the next character
response+=c;
}
}
return response;
}
app that allows
- Single button: 10
(Data sent to Arduino when each button is pressed)
Button 1: 0 (hexadecimal 30) Button 2: 1 (hexadecimal 31)
Button 3: 2 (hexadecimal 32) Button 4: 3 (hexadecimal 33)
Button 5: 4 (hexadecimal 34) Button 6: 5 (hexadecimal 35)
Button 7: 6 (hexadecimal 36) Button 8: 7 (hexadecimal 37)
Button 9: 8 (hexadecimal 38) Button 10: 9 (hexadecimal 39)
(Example of program in Arduino)
LED connected to digital port 5 of Arduino turns on when button 1 is pressed once, and turns off when pressed again.
(Toggle action)
///// Controlling LEDs via Wi-Fi
Include SoftwareSerial.h in the first part.
SoftwareSerial esp8266(2,3);
void setup()
{
Serial.
begin(9600);
esp8266.begin(9600); // baud rate of esp
pinMode(5, OUTPUT);
digitalWrite(, LOW);
sendData("AT+RST\r\n",2000); // module reset
sendData("AT+CWMODE=2\r\n",1000); // set as AP (access point)
sendData("AT+CIFSR\r\n",1000); // get ip address
sendData("AT+CIPMUX=1\r\n",1000); // set to multiple connections
sendData("AT+CIPSERVER=1,80\r\n",1000); // server on port 80
}
void loop()
{
if(esp8266.available()) // if esp is sending a message
{
if(esp8266.find("+IPD,"))
{
delay(200); // read all serial data
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 command
String closeCommand = "AT+CIPCLOSE=";
closeCommand += connectionId; // attach connection id
closeCommand += "\r\n";
sendData(closeCommand,1000); // close connection
}
}
}
String sendData(String command, const int timeout)
{
String response = "";
esp8266.print(command); // send read character to esp8266
long int time = millis();
while( (time+timeout) > millis())
{
while(esp8266.available())
{
// If there is received data in esp, send it serially
char c = esp8266.read(); // read the next character
response+=c;
}
}
return response;
}
MyAndroid is not a downloader online for arduino_wifi_pcs. It only allows to test online arduino_wifi_pcs with apkid com.arduino.wifi.pcs. MyAndroid provides the official Google Play Store to run arduino_wifi_pcs online.
©2024. MyAndroid. All Rights Reserved.
By OffiDocs Group OU – Registry code: 1609791 -VAT number: EE102345621.