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

相关推荐
恋上钢琴的虫2 天前
esp32串口通信
esp32
深圳启明云端科技3 天前
AI语音交互模组方案,设备无线物联网控制,实时语音联动应用
人工智能·物联网·esp32·模块·ai语音交互·芯片模组
flashier7 天前
ESP32学习笔记_Bluetooth(3)——GATT
笔记·学习·esp32·蓝牙
xiaohai@Linux12 天前
ESP32 在IDF_V5.3.1版本下实现AP无线热点模式!(带WIFI事件处理)
c语言·嵌入式硬件·tcp/ip·wifi·esp32
乐鑫科技 Espressif12 天前
解锁 AIoT 无限可能,乐鑫邀您共赴 Embedded World 2025
esp32·wi-fi·iot·乐鑫科技·embedded world
深圳启明云端科技16 天前
ESP32无线Wi-Fi蓝牙方案,设备智能连接控制,物联网通信应用
物联网·esp32·芯片·乐鑫·模组·无线方案
PassLink_20 天前
ESP32S3(主模式) 与 STM32(从模式) 进行SPI全双工通信
stm32·单片机·嵌入式硬件·esp32·spi
生活最重要(ง •̀_•́)ง22 天前
[ESP32:Vscode+PlatformIO]添加第三方库 开源库 与Arduino导入第三方库的区别
esp32·arduino·第三方库·开源库·platformio
生活最重要(ง •̀_•́)ง1 个月前
[ESP32:Vscode+PlatformIO]新建工程 常用配置与设置
vscode·esp32·arduino·platformio