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

相关推荐
欢乐熊嵌入式编程7 小时前
WIFI通信协议全解析18: ESP32 作为 AP 热点:打造自己的“微型路由器”(附完整实战代码)
物联网·wifi·esp32·蓝牙·wifi协议·ap热点
sanzk1 天前
修改blink让灯闪烁
esp32
乐鑫科技 Espressif3 天前
ESP32-E22 获 Wi-Fi 6E 认证,开源 Linux 驱动同步发布
esp32·wi-fi·乐鑫科技·esp32-e22·wi-fi 6e
Mr_Tony3 天前
ESP32开发板环境安装
esp32
星越华夏7 天前
ESP32-CAM图像传输项目说明文档
java·后端·struts·esp32
2301_805962938 天前
ESP32 使用 PlatformIO 编译点灯程序
stm32·esp32
大江东去浪淘尽千古风流人物11 天前
【Micro-WL Robot】桌面级轮腿机器人全栈解析:LQR平衡控制、SimpleFOC驱动与五连杆腿部机构源码深度拆解
驱动开发·机器人·esp32·lqr·simplefoc·轮腿机器人·平衡控制
π同学17 天前
ESP-IDF+vscode开发ESP32第十五讲——队列、流缓冲区、环形缓冲区
vscode·esp32·缓冲区
taiguisheng17 天前
Docker中编译esp32
windows·docker·esp32
止观止21 天前
基于 BSP 组件的 ESP-IDF 开发实践:从零开始点亮 M5Stack CoreS3 屏幕
esp32·esp-idf·m5stack cores3