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

相关推荐
虎王物联4 小时前
ESP32 FreeRTOS多任务优先级翻转与互斥量保护实战
物联网·嵌入式·esp32·freertos
jianqiang.xue8 小时前
低功耗产品架构专项优化:电池供电设备休眠、唤醒、漏电流、待机功耗极致优化
stm32·单片机·mcu·物联网·架构·esp32
jianqiang.xue9 小时前
专栏简介:《嵌入式 AI 智能体设计实战》
人工智能·stm32·单片机·物联网·架构·esp32
逗脑IDE1 天前
零基础学ESP32:蜂鸣器——让ESP32会“唱歌”!
python·物联网·esp32·智能家居
智码看视界2 天前
Edge AI 全栈1:ESP32 传感器采集到云端大模型推理的完整链路
人工智能·物联网·嵌入式·esp32·aiot·全栈开发·edgeai
k4m7v2pz7 天前
ESP32-S3 + I2S 麦克风实时音频流静音问题排查:从网络到AGC的谬误溯源
rust·音频·esp32·agc·实时监听·静音排查
嵌入式阿蔡8 天前
项目实战 02:智能家居环境网关——ESP32 做 BLE 中心 + 本地联动
网络·单片机·嵌入式硬件·esp32·智能家居·嵌入式实时数据库
HKElec14 天前
PaperFocus:基于 ESP32-S3 与墨水屏的开源专注助手
物联网·esp32
虎王物联15 天前
物联网协议网关设计:多协议融合与数据转换的工程实战
物联网·嵌入式·esp32
汤姆yu20 天前
基于ESP32的玫瑰大棚智能系统
物联网·esp32·arduino·大棚温湿度