stm32智能垃圾桶,垃圾分类
一、硬件材料清单:1、STM32核心板2、OLED显示屏3、语音识别模块4、舵机二、实现的功能1:语音识别2:垃圾分类3:例如说出“干垃圾“对应舵机会旋转90度,并在1s后自动关闭,模拟垃圾桶的打开与关闭三、效果演示四、硬件部分源代码共享#include "delay.h"#include "sys.h"#include "oled.h"#include "bmp.h"#include "ld33
·
一、硬件材料清单:
1、STM32核心板
2、OLED显示屏
3、语音识别模块
4、舵机
二、实现的功能
1:语音识别
2:垃圾分类
3:例如说出“干垃圾“ 对应舵机会旋转90度,并在1s后自动关闭,模拟垃圾桶的打开与关闭
三、效果演示
四、硬件部分源代码共享
#include "delay.h"
#include "sys.h"
#include "oled.h"
#include "bmp.h"
#include "ld3320.h"
#include "usart.h"
#include "pwm.h"
int main(void)
{
delay_init();
NVIC_Configuration();
uart_init(115200);
printf("\r\nUNV-LD3320-Test_Board-V1.0\r\n");
LD3320_main();
OLED_Init();
OLED_ColorTurn(0);//0Õý³£ÏÔʾ£¬1 ·´É«ÏÔʾ
OLED_DisplayTurn(0);//0Õý³£ÏÔʾ 1 ÆÁÄ»·×ªÏÔʾ
OLED_Refresh();
//OLED_ShowString(0,0,(u8*)"UNVLD3320",16);
//ÖÇÄÜÀ¬»øÍ°
OLED_ShowChinese(24,0,0,16);
OLED_ShowChinese(40,0,1,16);
OLED_ShowChinese(56,0,2,16);
OLED_ShowChinese(72,0,3,16);
OLED_ShowChinese(88,0,4,16);
OLED_Refresh();
TIM2_PWM_Init(1440-1,1000);//²»·ÖƵ¡£PWMƵÂÊ=72000000/(1440)/1000=50hz 20ms
while(1)
{
Ld3320_Fun();
}
}
五、源代码链接
https://item.taobao.com/item.htm?spm=a230r.7195193.1997079397.9.3d90521efbR9d0&id=632327824830&abbucket=9
更多推荐
已为社区贡献3条内容
所有评论(0)