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

相关推荐
π同学2 天前
ESP-IDF+vscode开发ESP32第十三讲——NVS
vscode·esp32·nvs
NPE~3 天前
[嵌入式]嵌入式在线仿真平台 —— Wokwi 入门指南
stm32·嵌入式·esp32·教程·平台
小手智联老徐3 天前
Arduino IDE环境搭建与点亮ESP32 D1板载LED
嵌入式硬件·esp32·arduino
π同学4 天前
ESP-IDF+vscode开发ESP32第十二讲——event
vscode·esp32·事件循环库event
桔子雨9 天前
C# ESP32/STM32 轻量 Web 能力库:PicoServer.Nano
esp32·webapi·picoserver·picoserver.nano
csdn_aspnet9 天前
单片机IO不够?ULN2003A救急方案,结合STM32/ESP32实战案例,讲透达林顿阵列在IoT硬件中的高效复用
stm32·单片机·物联网·esp32·iot·uln2003a
lingzhilab12 天前
零知派ESP32——基于INA238高精度功率监测芯片的18650锂电池充电状态可视化与数据导出
单片机·esp32·ina238
阿昊真人12 天前
AIR780E MINI开发日志
esp32
温中志14 天前
esp_event_loop_create_default详细解释
esp32·freertos
似是燕归来14 天前
WiFi 模块自动联网自带MQTT协议栈和云服务器串口透传免AT开发
服务器·esp32·wifi模块·mqtt协议