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

相关推荐
Keith Guo1 天前
ESP32-S31芯片架构中文件系统在不同的Flash的位置对PSRAM的性能影响
性能优化·架构·esp32
jianqiang.xue1 天前
把Agent塞进MCU:工具次数和上下文长度怎么卡
java·前端·网络·单片机·esp32·ai编程
不脱发的程序猿5 天前
ESP32制作加热杯垫
嵌入式硬件·物联网·esp32·语音识别
智码看视界12 天前
Edge AI 与 IoT 全栈:云端时序数据库 + Grafana 看板,把数据变成洞察
物联网·mqtt·esp32·时序数据库·influxdb·tdengine
天空'之城14 天前
009基于物联网的智能厨房安全监测系统
毕业设计·esp32·电磁阀·厨房安全·燃气检测
天空'之城19 天前
004基于语音识别的智能家居本地控制系统
毕业设计·esp32·智能家居·语音识别·离线控制
weixin_4043806323 天前
MQTT 上云验收:ESP32-S3 从局域网控灯到远程网页控制
物联网·mqtt·esp32
探鸽小钛24 天前
4G 终端 ES8311 - 挂断一次,下次说话就没声了之解决办法
物联网·音视频·嵌入式·esp32·webrtc
光子物联单片机25 天前
ESP32传感器模块编程实践(一)DIY智能WIFI视频控制小车
嵌入式硬件·esp32·智能硬件·硬件
编码追梦人1 个月前
基于 ESP32-S3 的便携式多参数环境监护仪设计:从硬件选型到 FreeRTOS 多任务落地
数据库·单片机·嵌入式硬件·mongodb·esp32·freertos·低功耗设计