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

相关推荐
小_楠_天_问3 天前
第二课:ESP32 使用 PWM 渐变控制——实现模拟呼吸灯或音调变化
c语言·嵌入式硬件·mcu·esp32·arduino·pwm·esp32-s3
阿杜杜不是阿木木9 天前
使用ESPHome烧录固件到ESP32-C3并接入HomeAssistant
物联网·esp32·iot·homeassistant·esp32-c3·esphome
龙大大L16 天前
5.4 ESP32物联网开发实战教学:三大项目详解
嵌入式硬件·物联网·esp32
龙大大L21 天前
第五章:5.3 ESP32物联网应用:阿里云IoT平台与腾讯云IoT平台的数据上传与远程控制
java·物联网·struts·esp32
PassLink_22 天前
[ESP-IDF]:esp32-camera 使用指南 ESP32S3-OV2640 用例测试
esp32·c·esp-idf·ov2640·esp32-camera·esp32s3-cam
优信电子1 个月前
ESP8266_ESP32 Smartconfig一键配网功能
esp32·esp8266·smartconfig·无线配网
ling9131 个月前
微信小程序通过mqtt控制esp32
mqtt·微信小程序·小程序·esp32·巴法云
Freddy_Ssc1 个月前
ESP32之阿里云IoT物模型通信(MQTT-TLS连接通信),基于VSCode环境下的ESP-IDF开发(附源码)
vscode·物联网·阿里云·esp32·物模型
宁子希1 个月前
如何将 ESP32 快速接入高德、心知、和风天气API 获取天气信息
android·单片机·嵌入式硬件·esp32
mingupup1 个月前
ESP32+Arduino入门(三):连接WIFI获取当前时间
esp32·arduino