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

相关推荐
superior tigre2 天前
esp32学习随笔文档1
学习·esp32
特立独行的猫a5 天前
ESP32使用笔记(基于ESP-IDF):小智AI的ESP32项目架构与启动流程全面解析
人工智能·架构·esp32·小智ai
我先去打把游戏先8 天前
ESP32学习笔记(基于IDF):ESP32连接MQTT服务器
服务器·笔记·单片机·嵌入式硬件·学习·esp32
我先去打把游戏先9 天前
ESP32学习笔记(基于IDF):SmartConfig一键配网
笔记·嵌入式硬件·mcu·物联网·学习·esp32·硬件工程
我先去打把游戏先12 天前
ESP32学习笔记(基于IDF):IOT应用——WIFI连接
笔记·单片机·嵌入式硬件·mcu·物联网·学习·esp32
星野云联AIoT技术洞察1 个月前
OpenMQTTGateway 技术全解:统一多协议到 MQTT 的开源网关
lora·esp32·智能家居·ble·ir·iot网关·openmqttgateway
Anonymousgirls1 个月前
正点原子小智BOX0/BOX2 产品使用视频表情功能
学习·esp32·小智ai·视频表情
朱自清的诗.2 个月前
使用python脚本储存mosquito服务器数据到sqlite
python·单片机·sqlite·esp32
朱自清的诗.2 个月前
使用虚拟机Ubuntu搭建mosquito服务器 使esp32、上位机通信
ubuntu·esp32·mosquito
java 乐山2 个月前
改华为智能插座为mqtt本地控制
esp32