当前位置:网站首页>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 :
边栏推荐
- 二叉树的前序,中序,后续(非递归版本)
- [Cloudera][ImpalaJDBCDriver](500164)Error initialized or created transport for authentication
- 如何写出好代码 - 防御式编程指南
- 精益六西格玛项目辅导咨询:集中辅导和点对点辅导两种方式
- 智慧党建: 穿越时空的信仰 | 7·1 献礼
- 摩根大通期货开户安全吗?摩根大通期货公司开户方法是什么?
- TensorFlow团队:我们没被抛弃
- Survey of intrusion detection systems:techniques, datasets and challenges
- Recommendation of data acquisition tools and detailed graphic process of data acquisition list
- SAP S/4HANA: 一条代码线,许多种选择
猜你喜欢

Pico,能否拯救消费级VR?

Photoshop plug-in HDR (II) - script development PS plug-in

Samsung took the lead in putting 3nm chips into production, and Shanghai's fresh master students can settle directly. Nankai has established a chip science center. Today, more big news is here

For the sustainable development of software testing, we must learn to knock code?

重回榜首的大众,ID依然乏力

工厂高精度定位管理系统,数字化安全生产管理

Crypto Daily:孙宇晨在MC12上倡议用数字化技术解决全球问题

张驰咨询:家电企业用六西格玛项目减少客户非合理退货案例
Don't ask me again why MySQL hasn't left the index? For these reasons, I'll tell you all

【显存优化】深度学习显存优化方法
随机推荐
Redis high availability principle
Returning to the top of the list, the ID is still weak
基于PHP的轻量企业销售管理系统
Reading notes of top performance version 2 (V) -- file system monitoring
Is JPMorgan futures safe to open an account? What is the account opening method of JPMorgan futures company?
2022-07-01日报:谷歌新研究:Minerva,用语言模型解决定量推理问题
STM32F4-TFT-SPI时序逻辑分析仪调试记录
ThinkPHP进阶
Short Wei Lai grizzly, to "touch China" in the concept of stocks for a living?
Tanabata confession introduction: teach you to use your own profession to say love words, the success rate is 100%, I can only help you here ~ (programmer Series)
【php毕业设计】基于php+mysql+apache的教材管理系统设计与实现(毕业论文+程序源码)——教材管理系统
Raytheon technology rushes to the Beijing stock exchange and plans to raise 540million yuan
Task. Run(), Task. Factory. Analysis of behavior inconsistency between startnew() and new task()
远程办公经验?来一场自问自答的介绍吧~ | 社区征文
做空蔚来的灰熊,以“碰瓷”中概股为生?
Qt+pcl Chapter 6 point cloud registration ICP Series 2
Zhang Chi Consulting: household appliance enterprises use Six Sigma projects to reduce customers' unreasonable return cases
电脑照片尺寸如何调整成自己想要的
Crypto Daily:孙宇晨在MC12上倡议用数字化技术解决全球问题
Zero copy technology of MySQL