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

相关推荐
七夜zippoe2 天前
边缘计算:Python在IoT中的应用
python·物联网·esp32·边缘计算·iot
lingzhilab2 天前
零知IDE——基于ESP32的BLE Mesh蓝牙组网多灯智能控制系统
ide·单片机·esp32
2301_805962933 天前
ESP32远程OTA升级:从局域网到公网部署
网络·后端·http·esp32
Funing74 天前
无法打开 源 文件 “esp_err.h“
嵌入式硬件·esp32
特立独行的猫a5 天前
ESP32小智AI的WebSocket 调试工具实现,小智AI后台交互过程揭秘(一、开篇介绍 )
人工智能·websocket·网络协议·esp32·小智ai
闻道且行之5 天前
ESP32 搭建 HTTP 服务:接收图片并实时显示
网络·网络协议·http·esp32·tft_espi
特立独行的猫a5 天前
ESP32小智AI的WebSocket 调试工具的实现,小智AI后台交互过程揭秘(二、技术原理与实现过程详解 )
人工智能·websocket·网络协议·esp32·调试工具·小智ai
π同学5 天前
ESP-IDF+vscode开发ESP32第二讲——console
vscode·esp32·console
jianqiang.xue6 天前
ESP32-P4 看门狗复位全解析:HP_SYS_HP_WDT_RESET 故障排查实战
单片机·mcu·esp32·idf
421!6 天前
ESP32学习笔记之UART
笔记·学习·嵌入式·esp32·通信