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
相关推荐
童话名剑1 天前
序列模型与集束搜索(吴恩达深度学习笔记)
人工智能·笔记·深度学习·机器翻译·seq2seq·集束搜索·编码-解码模型
鄭郑1 天前
STM32学习笔记--I2C封装与OLED(2026.2.1)
笔记·stm32·学习
酒鼎1 天前
学习笔记(4)HTML5新特性(第3章)- WebSocket
笔记·学习·html5
-Springer-1 天前
STM32 学习 —— 个人学习笔记2-2(新建工程)
笔记·stm32·学习
tb_first1 天前
万字超详细苍穹外卖学习笔记4
java·spring boot·笔记·学习·spring·mybatis
日更嵌入式的打工仔1 天前
C内存布局
笔记
卡布叻_星星1 天前
达梦数据库笔记之使用教程以及不推荐迁移选择小写
笔记
山岚的运维笔记1 天前
SQL Server笔记 -- 第15章:INSERT INTO
java·数据库·笔记·sql·microsoft·sqlserver
孞㐑¥1 天前
算法—队列+宽搜(bfs)+堆
开发语言·c++·经验分享·笔记·算法
charlie1145141911 天前
嵌入式C++教程——ETL(Embedded Template Library)
开发语言·c++·笔记·学习·嵌入式·etl