ESP32-CAM导入ino项目编译和烧录

文章目录

ESP32 Cam 模式
接线图


导入ino项目
选择INO打开
目录结构

platformio.ini

bash 复制代码
; PlatformIO Project Configuration File
;
;   Build options: build flags, source filter
;   Upload options: custom upload port, speed and extra flags
;   Library options: dependencies, extra library storages
;   Advanced options: extra scripting
;
; Please visit documentation for the other options and examples
; https://docs.platformio.org/page/projectconf.html

[env:esp32cam]
platform = espressif32
board = esp32cam
framework = arduino
手动转换成C++

https://docs.platformio.org/en/latest/faq/ino-to-cpp.html

源代码
c 复制代码
#include <Arduino.h>

void setup() {
  pinMode(33, OUTPUT); // 将GPIO33设置为输出模式
}

void loop() {
  digitalWrite(33, HIGH); // 设置GPIO33输出高电平
  delay(1000); // 延时等待1000毫秒,即1秒
  digitalWrite(33, LOW); // 设置GPIO33输出低电平
  delay(1000); // 延时等待1000毫秒,即1秒
}
编译

Ctrl+Alt+B

效果图
搞猛一点

33为板载led红灯
4为闪光灯

bash 复制代码
#include <Arduino.h>
void setup()
{
  pinMode(33, OUTPUT); // 将GPIO33设置为输出模式
  pinMode(4, OUTPUT);  // 将GPIO33设置为输出模式
}

void loop()
{
  digitalWrite(33, HIGH); // 设置GPIO33出书输出高电平
  digitalWrite(4, HIGH);  // 设置GPIO33出书输出高电平
  delay(1000);            // 延时等待1000毫秒,即1秒

  digitalWrite(4, LOW);  // 设置GPIO33出书输出低电平
  digitalWrite(33, LOW); // 设置GPIO33出书输出低电平
  delay(1000);           // 延时等待1000毫秒,即1秒
}

效果图有点闪眼睛,自行脑部

其他实验

https://docs.geeksman.com/esp32

相关推荐
NQBJT2 天前
双轮足机器人 5 连杆逆运动学:从几何模型到嵌入式实现
esp32·逆运动学·轮足机器人
wanghanjiett3 天前
笔记:ESP32驱动SimpleFOC成功(基于Espressif-IDE)
笔记·esp32·foc
NQBJT4 天前
双轮足导盲机器人:多传感融合与全局-局部分层导航系统设计
c++·esp32·openmv·避障·导盲·轮足
net3m335 天前
mic声音怎么才不容易卡顿 : 环形队列缓存要足够大
esp32·i2s
net3m335 天前
不要用esp_websocket_client_send_bin直接发送前导音频,会卡,导致mic声音卡顿,要用环形队列
esp32
net3m336 天前
24位INMP441的相关配置,原本是16位mic数据,麦克风音质不高
esp32·i2s
SmartRadio7 天前
ESP32-S3 双模式切换实现:兼顾手机_路由器连接与WiFi长距离通信
开发语言·网络·智能手机·esp32·长距离wifi
π同学8 天前
ESP-IDF+vscode开发ESP32第十讲——I2S工程2
vscode·esp32·sd·音频播放
SmartRadio8 天前
ESP32-S3 双模式切换实现:兼顾手机_路由器连接与WiFi长距离通信 (采用Arduino代码框架)
开发语言·智能手机·esp32·长距离wifi
饕餮tt9 天前
基于ESP-IDF的ESP32开发记录——如何初始化ADC并完成转换
esp32·esp-idf