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
相关推荐
quanjui10 小时前
【医学尝试】基于Segment Anything Model的医学图像分割研究:眼底OCT与X线胸片微调实战
人工智能·笔记·学习
小黄蚁10 小时前
FreeRTOS学习笔记(十二)
笔记·学习
茯苓gao10 小时前
嵌入式开发笔记:电机参数辨识与自学习完全指南——从电气参数到机械特性的深度解析
笔记·嵌入式硬件·学习
优化Henry11 小时前
学习笔记之VoNR语音业务注册流程
网络·笔记·学习·5g·信息与通信
摇滚侠11 小时前
《RocketMQ 官网》阅读笔记 RocketMQ 订阅 (Subscription)
笔记·rocketmq
风曦Kisaki13 小时前
Kubernetes(K8s)笔记Day03: Pod命名空间,标签,Pod 的调度,污点与容忍度,Pod 常见状态和重启策略,Pod 生命周期
linux·运维·笔记·docker·云原生·容器·kubernetes
六bring个六13 小时前
git使用笔记
笔记·git
砚凝霜13 小时前
软考网络工程师|第 3 章 以太网帧、物理层标准、VLAN 完整备考笔记
网络·笔记
hanlin0313 小时前
刷题笔记:力扣第704、977、209题(数组相关)
笔记·算法·leetcode
晓梦林14 小时前
[WUSTCTF2020]Cr0ssfun-学习笔记
笔记·学习