ESP8266上显示旧的WiFi SSID

时间:2019-07-02 10:07:13

标签: arduino wifi esp8266

我正在使用RemoteXY库和在线应用程序制造商从事Arduino项目。当我尝试使用手机登录wifi时出现我的问题。我转到WiFi设置,而不是看到“ Ant-Man's Van”作为网络名称,而是看到“ Inkognitic?Arduinoitic”-我使用相同的esp8266模块完成的项目的名称。

用于测试的手机:三星Galaxy J3 2017

图片:https://imgur.com/CIivh4f

// 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);  
    }
}

1 个答案:

答案 0 :(得分:0)

在从Arduino IDE刷新新固件之前,请使用esptool.py擦除闪存。

  1. 通过esptool在您的计算机上安装pip install esptool
  2. 通过esptool.py --port <serial-port> erase_flash擦除闪存。

有关该工具的更多详细信息,请参见here

要了解有关此行为的更多信息,请阅读以下内容:

  1. https://arduino.stackexchange.com/questions/52059/does-the-esp8266-somehow-remember-wifi-access-data

  2. https://github.com/esp8266/Arduino/issues/2843