当前位置:网站首页>Programming examples of stm32f1 and stm32subeide - production melody of PWM driven buzzer
Programming examples of stm32f1 and stm32subeide - production melody of PWM driven buzzer
2022-07-01 15:53:00 【Visual intelligence】
PWM Drive buzzer to produce melody
Buzzer or buzzer is an audio signal device , It can be mechanical 、 Electromechanical or piezoelectric ( Piezoelectric for short ). Its main function is to convert the signal from audio to sound . Generally, it is powered by DC voltage , For timer 、 a burglar alarm 、 The printer 、 a burglar alarm 、 Computer, etc. . According to different designs , It can produce different sounds , Like an alarm clock 、 music 、 Bells and sirens .

Buzzer is divided into active buzzer and passive buzzer . This example uses a passive buzzer , As shown in the figure above .
1、 Buzzer configuration
Development environment construction 、 System clock configuration 、 Debugging configuration and serial port configuration , Please refer to :
- STM32F1 And STM32CubeIDE Quick start - Development environment construction
- STM32F1 And STM32CubeIDE Quick start -GPIO Overview and lighting LED
- STM32F1 And STM32CubeIDE Quick start -USART/UART Serial port communication
This instance passes the PWM Function driven buzzer . By designation PWM Output time length and adjustment PWM output frequency , Generate different sounds ( melody ). The configuration is as follows :
边栏推荐
- "Qt+pcl Chapter 6" point cloud registration ICP Series 6
- 雷神科技冲刺北交所,拟募集资金5.4亿元
- 【开源数据】基于虚拟现实场景的跨模态(磁共振、脑磁图、眼动)人类空间记忆研究开源数据集
- 【Pygame实战】你说神奇不神奇?吃豆人+切水果结合出一款你没玩过的新游戏!(附源码)
- Pnas: brain and behavior changes of social anxiety patients with empathic embarrassment
- Factory high-precision positioning management system, digital safety production management
- Logical analysis of automatic decision of SAP CRM organization model
- ABAP-调用Restful API
- Connect the ABAP on premises system to the central inspection system for custom code migration
- Lean Six Sigma project counseling: centralized counseling and point-to-point counseling
猜你喜欢

"Qt+pcl Chapter 6" point cloud registration ICP Series 6

软件测试的可持续发展,必须要学会敲代码?

AVL 平衡二叉搜索树
![[STM32 learning] w25qxx automatic judgment capacity detection based on STM32 USB storage device](/img/41/be7a295d869727e16528041ad08cd4.png)
[STM32 learning] w25qxx automatic judgment capacity detection based on STM32 USB storage device

基于PHP的轻量企业销售管理系统
![[IDM] IDM downloader installation](/img/2b/baf8852b422c1c4a18e9c60de864e5.png)
[IDM] IDM downloader installation

MySQL的零拷贝技术

【OpenCV 例程200篇】216. 绘制多段线和多边形
![[target tracking] | template update time context information (updatenet)](/img/53/0a8b2135fa4903f30e4573256c393a.png)
[target tracking] | template update time context information (updatenet) "learning the model update for Siamese trackers"

An intrusion detection model
随机推荐
求求你们,别再刷 Star 了!这跟“爱国”没关系!
七夕表白攻略:教你用自己的专业说情话,成功率100%,我只能帮你们到这里了啊~(程序员系列)
Some abilities can't be learned from work. Look at this article, more than 90% of peers
ABAP-调用Restful API
Pnas: brain and behavior changes of social anxiety patients with empathic embarrassment
2022-07-01日报:谷歌新研究:Minerva,用语言模型解决定量推理问题
Qt+pcl Chapter 6 point cloud registration ICP series 4
新出生的机器狗,打滚1小时后自己掌握走路,吴恩达开山大弟子最新成果
[Cloudera][ImpalaJDBCDriver](500164)Error initialized or created transport for authentication
What is the forkjoin framework in the concurrent programming series?
Redis seckill demo
Summary of point cloud reconstruction methods I (pcl-cgal)
Seate中用了shardingjdbc 就不能用全局事务了吗?
[pyGame practice] do you think it's magical? Pac Man + cutting fruit combine to create a new game you haven't played! (source code attached)
【OpenCV 例程200篇】216. 绘制多段线和多边形
【STM32学习】 基于STM32 USB存储设备的w25qxx自动判断容量检测
Research on manually triggering automatic decision of SAP CRM organization model with ABAP code
Crypto Daily:孙宇晨在MC12上倡议用数字化技术解决全球问题
ThinkPHP advanced
Logical analysis of automatic decision of SAP CRM organization model