ESP32S3-Cam实践(LedStrip、RC舵机控制)

0.参考

以ESP Component espressif/led_strip组件的example为工程进行实践。

1.挂载LedStrip

确定连接的引脚,确定不使用DMA,确定灯珠个数

cpp 复制代码
// Set to 1 to use DMA for driving the LED strip, 0 otherwise
// Please note the RMT DMA feature is only available on chips e.g. ESP32-S3/P4
#define LED_STRIP_USE_DMA  0

#if LED_STRIP_USE_DMA==1

// Numbers of the LED in the strip
#define LED_STRIP_LED_COUNT 256
#define LED_STRIP_MEMORY_BLOCK_WORDS 1024 // this determines the DMA block size

#elif LED_STRIP_USE_DMA==0

// Numbers of the LED in the strip
#define LED_STRIP_LED_COUNT 35
#define LED_STRIP_MEMORY_BLOCK_WORDS 0 // let the driver choose a proper memory block size automatically

#endif // LED_STRIP_USE_DMA

// GPIO assignment
#define LED_STRIP_GPIO_PIN  3

2.Build,Flash and Monitor

监视器输出,GoodGood

bash 复制代码
I (256) main_task: Started on CPU0
I (266) main_task: Calling app_main()
I (266) example: Created LED strip object with RMT backend
I (266) example: Start blinking LED strip
I (276) example: LED OFF!
I (776) example: LED ON!
I (1276) example: LED OFF!

0.参考

以ESP-IDF v5.5.0的MCPWM RC Servo Control Example进行实践。

1.挂载SG90

确定舵机信号线连接的引脚与示例程序中一致。

cpp 复制代码
#define SERVO_PULSE_GPIO  8  // GPIO connects to the PWM signal line

2.Build,Flash and Monitor

监视器输出,GoodGood

bash 复制代码
I (252) main_task: Started on CPU0
I (262) main_task: Calling app_main()
I (262) example: Create timer and operator
I (262) example: Connect timer and operator
I (262) example: Create comparator and generator from the operator
I (272) example: Set generator action on timer and compare event
I (282) example: Enable and start timer
I (282) example: Angle of rotation: 0
I (782) example: Angle of rotation: 2
I (1282) example: Angle of rotation: 4
相关推荐
2601_961146202 小时前
实验室用等离子表面处理设备处理新能源汽车塑料件的一点记录
笔记·汽车·设备
知产xiao_xin2 小时前
专利主体及权利归属
经验分享·笔记·知识产权
学电子她就能回来吗2 小时前
LeetCode Hot 100|普通数组专题学习笔记(零基础版)
笔记·算法·leetcode
2601_965384262 小时前
从微生态与流体力学视角看:“口水臭”的系统级成因与清洁边界
经验分享·笔记
卿卿的产品经理日记3 小时前
【AI产品经理实战】Day 38|try-except 踩坑实录:报错是数据
人工智能·笔记·python·学习·产品经理
NetX行者6 小时前
Rust 初体验:一个全栈工程师的编译器“毒打“笔记
开发语言·笔记·rust
热爱生活的五柒7 小时前
zotero能导入已经下载好的pdf文件嘛,并且点击条目时,能直接看到下载的pdf文件嘛,我还希望能在里面做笔记
笔记·pdf
海绵宝宝转agent8 小时前
2026-10-19学习笔记
笔记·学习
金色光环8 小时前
【概率论详细笔记】泊松分布是怎么来的?应该怎么用?
笔记·概率论
又見山8 小时前
双向链接的本质:链接不是功能,是思考留下的痕迹
笔记·obsidian