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
相关推荐
闪闪发亮的小星星3 小时前
高斯光以及高斯光公式解释
笔记
cqbzcsq4 小时前
CellFlow虚拟细胞论文阅读
论文阅读·人工智能·笔记·学习·生物信息
阿米亚波5 小时前
【Windows】QEMU 启动 openEuler aarch64/arm64 架构系统 + 离线软件源
linux·windows·经验分享·笔记·架构·arm
自传.5 小时前
尚硅谷 Vibe Coding|第三章(1) Claude Code深度使用与进阶技巧 学习笔记
笔记·学习·尚硅谷·vibecoding
.千余6 小时前
【C++】模板进阶全解:非类型参数|全特化|偏特化|分离编译完全指南
开发语言·c++·笔记·学习·其他
自传.6 小时前
尚硅谷 Vibe Coding|第二章 AI编程工具生态 学习笔记
笔记·学习·ai编程·尚硅谷·vibe coding
秋波。未央7 小时前
Java Agent 开发 · Day 1 学习笔记(含作业完整标准答案)
java·笔记·学习
中屹指纹浏览器8 小时前
2026指纹浏览器字体指纹、字体渲染偏差检测与全维度虚拟字体池搭建方案
经验分享·笔记
影寂ldy8 小时前
WinForm PictureBox控件 + ImageList组件 完整笔记
开发语言·笔记·swift