ESP8266 上显示旧的 WiFi SSID
Old WiFi SSID is displayed on ESP8266
我正在使用 RemoteXY 库和在线应用程序制作器开发一个 Arduino 项目。当我尝试使用 phone 登录 wifi 时出现问题。我转到 WiFi 设置,而不是看到 "Ant-Man's Van" 作为我看到的网络名称 "Inkognitic Arduinoitic" - 我使用相同的 esp8266 模块所做的项目的名称。
用于测试的phone:Samsung Galaxy J3 2017
// RemoteXY select connection mode and include library
#define REMOTEXY_MODE__ESP8266_SOFTSERIAL_POINT
#include <SoftwareSerial.h>
#include <RemoteXY.h>
// RemoteXY connection settings
#define REMOTEXY_SERIAL_RX 2
#define REMOTEXY_SERIAL_TX 3
#define REMOTEXY_SERIAL_SPEED 9600
#define REMOTEXY_WIFI_SSID "Ant-Man's Van"
#define REMOTEXY_WIFI_PASSWORD "12345678"
#define REMOTEXY_SERVER_PORT 6377
// RemoteXY configurate
#pragma pack(push, 1)
uint8_t RemoteXY_CONF[] =
{ 255,5,0,0,0,63,0,8,13,0,
2,1,53,1,46,13,2,26,31,31,
79,78,0,79,70,70,0,1,4,55,
16,26,26,2,31,84,73,77,69,32,
77,65,67,72,73,78,69,0,5,0,
3,8,50,50,2,26,31,1,4,75,
38,24,24,2,31,72,79,82,78,0 };
// this structure defines all the variables of your control interface
struct {
uint8_t switch_; // =1 if switch ON and =0 if OFF
uint8_t machine; // =1 if button pressed, else =0
int8_t joystick_x; // =-100..100 x-coordinate joystick position
int8_t joystick_y; // =-100..100 y-coordinate joystick position
uint8_t horn; // =1 if button pressed, else =0
uint8_t connect_flag; // =1 if wire connected, else =0
} RemoteXY;
#pragma pack(pop)
void setup(void)
{
pinMode(8, OUTPUT);//buzzer
pinMode(13, OUTPUT);
pinMode(12, OUTPUT);//led indicators when singing a note
RemoteXY_Init();
for(int i=0;i<2;i++){
digitalWrite(8, HIGH);
delay(100);
digitalWrite(8,LOW);
delay(500);
}
}
void loop()
{
RemoteXY_Handler();
if(RemoteXY.horn){
sing(1);
sing(2);
sing(3);
}
if(RemoteXY.switch_){
digitalWrite(13,HIGH);
digitalWrite(12, HIGH);
}else{
digitalWrite(13,HIGH);
digitalWrite(12, HIGH);
}
}
在从 Arduino 刷新新固件之前 IDE 使用 esptool.py 擦除闪存。
- 通过
pip install esptool
在您的计算机上安装 esptool
。
- 通过
esptool.py --port <serial-port> erase_flash
擦除闪存。
可以找到该工具的更多详细信息 here。
要了解有关此行为的更多信息,请阅读以下内容:
我正在使用 RemoteXY 库和在线应用程序制作器开发一个 Arduino 项目。当我尝试使用 phone 登录 wifi 时出现问题。我转到 WiFi 设置,而不是看到 "Ant-Man's Van" 作为我看到的网络名称 "Inkognitic Arduinoitic" - 我使用相同的 esp8266 模块所做的项目的名称。
用于测试的phone:Samsung Galaxy J3 2017
// RemoteXY select connection mode and include library
#define REMOTEXY_MODE__ESP8266_SOFTSERIAL_POINT
#include <SoftwareSerial.h>
#include <RemoteXY.h>
// RemoteXY connection settings
#define REMOTEXY_SERIAL_RX 2
#define REMOTEXY_SERIAL_TX 3
#define REMOTEXY_SERIAL_SPEED 9600
#define REMOTEXY_WIFI_SSID "Ant-Man's Van"
#define REMOTEXY_WIFI_PASSWORD "12345678"
#define REMOTEXY_SERVER_PORT 6377
// RemoteXY configurate
#pragma pack(push, 1)
uint8_t RemoteXY_CONF[] =
{ 255,5,0,0,0,63,0,8,13,0,
2,1,53,1,46,13,2,26,31,31,
79,78,0,79,70,70,0,1,4,55,
16,26,26,2,31,84,73,77,69,32,
77,65,67,72,73,78,69,0,5,0,
3,8,50,50,2,26,31,1,4,75,
38,24,24,2,31,72,79,82,78,0 };
// this structure defines all the variables of your control interface
struct {
uint8_t switch_; // =1 if switch ON and =0 if OFF
uint8_t machine; // =1 if button pressed, else =0
int8_t joystick_x; // =-100..100 x-coordinate joystick position
int8_t joystick_y; // =-100..100 y-coordinate joystick position
uint8_t horn; // =1 if button pressed, else =0
uint8_t connect_flag; // =1 if wire connected, else =0
} RemoteXY;
#pragma pack(pop)
void setup(void)
{
pinMode(8, OUTPUT);//buzzer
pinMode(13, OUTPUT);
pinMode(12, OUTPUT);//led indicators when singing a note
RemoteXY_Init();
for(int i=0;i<2;i++){
digitalWrite(8, HIGH);
delay(100);
digitalWrite(8,LOW);
delay(500);
}
}
void loop()
{
RemoteXY_Handler();
if(RemoteXY.horn){
sing(1);
sing(2);
sing(3);
}
if(RemoteXY.switch_){
digitalWrite(13,HIGH);
digitalWrite(12, HIGH);
}else{
digitalWrite(13,HIGH);
digitalWrite(12, HIGH);
}
}
在从 Arduino 刷新新固件之前 IDE 使用 esptool.py 擦除闪存。
- 通过
pip install esptool
在您的计算机上安装esptool
。 - 通过
esptool.py --port <serial-port> erase_flash
擦除闪存。
可以找到该工具的更多详细信息 here。
要了解有关此行为的更多信息,请阅读以下内容: