8

ArduinoIDE下ESP32-CAM开发板测试WiFi失败的解决方法

 1 year ago
source link: https://xushanxiang.com/arduino-ide-esp32-cam-wifi.html
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
neoserver,ios ssh client

已完成配置

1.经过多次测试,ESP32开发板程序安装1.0.x或者2.0.x都可以。

esp32-Development-Board.png

2.根据自己板子的实际情况,确定一些配置参数:

ArduinoIDE→工具→开发板→ESP32 Arduino→AI Thinker ESP32-CAM。

ESP32_20231230_110546.png

3.改写配置代码:

打开ArduinoIDE→文件→示例→ESP32→Camera→CameraWebServer 。

// 1.Select camera model
......
#define CAMERA_MODEL_AI_THINKER // 根据板子选这个
......
// ===========================
// 2.Enter your WiFi credentials
// ===========================
const char* ssid = "Wifi路由器名称";
const char* password = "Wifi路由器网络安全密钥";
......
if (s->id.PID == OV3660_PID) {......}
// 3.把摄像头型号改为自己的
if (s->id.PID == OV2640_PID) {......}

编译和上传

成功后,提示如下:

ESP32_20231230_111946.png
......
Leaving......
Hard resettingvia RTS pin.

打开ArduinoIDE→工具→串口监视器,接着按一下烧录座的“RST”。

结果不管等多久,一直循环输出一段代码,应该是在不断尝试联网。

ESP32_20231230_112649.png
E(501)esp_core_dump_flash;No.core dump partition found!
14][D][esp32-hal-cpu.c:244] setCpuFrequencyMhz():PLL: 480 / 2 = 240 Mhz, APB:80000000 Hz 
4671[1][esp32-hal-psram.c:96] psramInit();PSRAM enabled

开始以为是其它问题,于是不联网,只测试是否能控制LED:

void setup() {
  // put your setup code here, to run once:
  pinMode(4,OUTPUT);
}

void loop() {
  // put your main code here, to run repeatedly:
  digitalWrite(4,HIGH);
  delay(1000);
  digitalWrite(4,LOW);
  delay(3000);

发现板子是没有问题的,于是又重新上传CameraWebServer了好几次还是问题重复。

偶然间,把连在机箱后面的USB线,插入机箱前面,也就是换了个端口,测试发现居然成功了,所以问题大概率是供电问题。


Recommend

About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK