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

相关推荐
jianqiang.xue1 天前
ESP-IDF保姆级入门11|FreeRTOS队列通信全解:生产者消费者+中断数据转发+多任务解耦,彻底搞定任务间交互
单片机·嵌入式硬件·物联网·架构·esp32
jianqiang.xue1 天前
ESP-IDF保姆级入门09|ADC模拟量采集全解:电位器调压+光敏传感器+OLED显示,打通模拟→数字全链路
stm32·单片机·物联网·架构·esp32
逗脑IDE1 天前
零基础学ESP32:光敏传感器——让ESP32拥有“感光”能力!
python·物联网·esp32·智能家居
jianqiang.xue3 天前
智能体整体架构设计:四大模块与目录组织
单片机·嵌入式硬件·物联网·架构·esp32
虎王物联3 天前
ESP32 FreeRTOS多任务优先级翻转与互斥量保护实战
物联网·嵌入式·esp32·freertos
jianqiang.xue3 天前
低功耗产品架构专项优化:电池供电设备休眠、唤醒、漏电流、待机功耗极致优化
stm32·单片机·mcu·物联网·架构·esp32
jianqiang.xue3 天前
专栏简介:《嵌入式 AI 智能体设计实战》
人工智能·stm32·单片机·物联网·架构·esp32
逗脑IDE4 天前
零基础学ESP32:蜂鸣器——让ESP32会“唱歌”!
python·物联网·esp32·智能家居
智码看视界5 天前
Edge AI 全栈1:ESP32 传感器采集到云端大模型推理的完整链路
人工智能·物联网·嵌入式·esp32·aiot·全栈开发·edgeai
k4m7v2pz10 天前
ESP32-S3 + I2S 麦克风实时音频流静音问题排查:从网络到AGC的谬误溯源
rust·音频·esp32·agc·实时监听·静音排查