当前位置:网站首页>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 :
边栏推荐
- Short Wei Lai grizzly, to "touch China" in the concept of stocks for a living?
- 说明 | 华为云云商店「商品推荐榜」
- 将ABAP On-Premises系统连接到中央检查系统以进行自定义代码迁移
- RT-Thread Env 工具介绍(学习笔记)
- Wechat applet 02 - Implementation of rotation map and picture click jump
- Preorder, inorder, follow-up of binary tree (non recursive version)
- Raytheon technology rushes to the Beijing stock exchange and plans to raise 540million yuan
- ThinkPHP advanced
- 6.2 normalization 6.2.6 BC normal form (BCNF) 6.2.9 normalization summary
- Photoshop插件-HDR(二)-脚本开发-PS插件
猜你喜欢

Factory high-precision positioning management system, digital safety production management

MySQL backup and restore single database and single table

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

6.2 normalization 6.2.6 BC normal form (BCNF) 6.2.9 normalization summary

An intrusion detection model
![[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)](/img/0a/c1a4b57b9729e0cf9de1feae9f8c19.png)
[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)

MySQL advanced 4

Win11如何设置用户权限?Win11设置用户权限的方法

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

Smart Party Building: faith through time and space | 7.1 dedication
随机推荐
Zhang Chi Consulting: household appliance enterprises use Six Sigma projects to reduce customers' unreasonable return cases
Qt+pcl Chapter 6 point cloud registration ICP series 4
将ABAP On-Premises系统连接到中央检查系统以进行自定义代码迁移
Trace the source of drugs and tamp the safety dike
Automatique, intelligent, visuel! Forte conviction des huit conceptions derrière la solution sslo
"Qt+pcl Chapter 6" point cloud registration ICP Series 6
Redis秒杀demo
RT-Thread Env 工具介绍(学习笔记)
[stm32-usb-msc problem help] stm32f411ceu6 (Weact) +w25q64+usb-msc flash uses SPI2 to read out only 520kb
[video memory optimization] deep learning video memory optimization method
软件测试的可持续发展,必须要学会敲代码?
Go language learning notes - Gorm use - table addition, deletion, modification and query | web framework gin (VIII)
Survey of intrusion detection systems:techniques, datasets and challenges
Redis high availability principle
【php毕业设计】基于php+mysql+apache的教材管理系统设计与实现(毕业论文+程序源码)——教材管理系统
智慧党建: 穿越时空的信仰 | 7·1 献礼
摩根大通期货开户安全吗?摩根大通期货公司开户方法是什么?
[target tracking] | template update time context information (updatenet) "learning the model update for Siamese trackers"
【300+精选大厂面试题持续分享】大数据运维尖刀面试题专栏(三)
搜索框和按钮缩放时会有缝隙的bug