当前位置:网站首页>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 :
边栏推荐
- [one day learning awk] conditions and cycles
- Logical analysis of automatic decision of SAP CRM organization model
- 张驰咨询:锂电池导入六西格玛咨询降低电池容量衰减
- 【一天学awk】函数与自定义函数
- Short Wei Lai grizzly, to "touch China" in the concept of stocks for a living?
- 【Pygame实战】你说神奇不神奇?吃豆人+切水果结合出一款你没玩过的新游戏!(附源码)
- Introduction to RT thread env tool (learning notes)
- Trace the source of drugs and tamp the safety dike
- ATSS:自动选择样本,消除Anchor based和Anchor free物体检测方法之间的差别
- Pico,能否拯救消费级VR?
猜你喜欢

Qt+pcl Chapter 9 point cloud reconstruction Series 2

智慧党建: 穿越时空的信仰 | 7·1 献礼

STM32ADC模拟/数字转换详解

如何写出好代码 - 防御式编程指南

Returning to the top of the list, the ID is still weak

华为发布HCSP-Solution-5G Security人才认证,助力5G安全人才生态建设

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

Some abilities can't be learned from work. Look at this article, more than 90% of peers
![[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

Raytheon technology rushes to the Beijing stock exchange and plans to raise 540million yuan
随机推荐
关于用 ABAP 代码手动触发 SAP CRM organization Model 自动决定的研究
Smart Party Building: faith through time and space | 7.1 dedication
STM32F4-TFT-SPI时序逻辑分析仪调试记录
Raytheon technology rushes to the Beijing stock exchange and plans to raise 540million yuan
【目标跟踪】|模板更新 时间上下文信息(UpdateNet)《Learning the Model Update for Siamese Trackers》
Hardware design guide for s32k1xx microcontroller
【Pygame实战】你说神奇不神奇?吃豆人+切水果结合出一款你没玩过的新游戏!(附源码)
【显存优化】深度学习显存优化方法
搜索框和按钮缩放时会有缝隙的bug
开机时小键盘灯不亮的解决方案
Deep operator overloading (2)
大龄测试/开发程序员该何去何从?是否会被时代抛弃?
将ABAP On-Premises系统连接到中央检查系统以进行自定义代码迁移
ThinkPHP进阶
HR interview: the most common interview questions and technical answers
Go language learning notes - Gorm use - table addition, deletion, modification and query | web framework gin (VIII)
TensorFlow團隊:我們沒被拋弃
SAP s/4hana: one code line, many choices
ATSs: automatically select samples to eliminate the difference between anchor based and anchor free object detection methods
电脑照片尺寸如何调整成自己想要的