【花雕动手做】ASRPRO-Plus语音识别(08)--- PT0603光敏三极管
本例实验采用PT0603光敏三极管电原理图
产品特性 / PRODUCT FEATURES
封装胶水:无色透明硅胶
外观尺寸(L/W/H):1.6*0.8*0.6mm
焊线材质:金线/合金线
感光峰值波段:850nm
感光范围:400-1050nm
发光角度:120度
EIA规范标准包装
环保产品,符合ROHS标准要求
应用领域 / PRODUCT APPLICATION
高灵敏度光敏传感器,替代传统CDS光敏电阻不含镉、铅等有害物质,符合欧盟ROHS标准
适用于各类光控照明产品,如小夜灯、太阳能路灯、草坪灯、环境灯控等
自动调节背景光,LCD、手机、照相机、数码相机、数码产品、GPS导航等
控制各类光控影控玩具等
各类光控检测测试设备等
【花雕动手做】实验十二:读取PT0603光敏三极管的光照度数值
实验开源代码
#include "asr.h"
extern "C"{ void * __dso_handle = 0 ;}
#include "setup.h"
#include "myLib/asr_event.h"
#include "myLib/asr_ws2812.h"
uint32_t snid;
uint16_t light;
void pins_attached();
void hardware_init();
//{ID:250,keyword:"命令词",ASR:"最大音量",ASRTO:"音量调整到最大"}
//{ID:251,keyword:"命令词",ASR:"中等音量",ASRTO:"音量调整到中等"}
//{ID:252,keyword:"命令词",ASR:"最小音量",ASRTO:"音量调整到最小"}
WS2812 ASR_WS2812_27(27);
void pins_attached(){
while (1) {
if((adc_read(17) > 1350)){
delay(200);
enter_wakeup(5000);
delay(200);
//{ID:500,keyword:"命令词",ASR:"耍接官",ASRTO:"环境太亮了,关闭遮阳板"}
play_audio(500);
ASR_WS2812_27.pixel_set_all_color(0,0,0);
ASR_WS2812_27.pixel_show();
delay(6000);
}
if((adc_read(17) < 80)){
delay(200);
enter_wakeup(5000);
delay(200);
//{ID:501,keyword:"命令词",ASR:"接耍官",ASRTO:"环境太暗了,打开照明灯光"}
play_audio(501);
ASR_WS2812_27.setBrightness(50);
ASR_WS2812_27.pixel_set_all_color(255,0,0);
ASR_WS2812_27.pixel_show();
delay(6000);
}
delay(1);
}
vTaskDelete(NULL);
}
void ASR_CODE()
{
//{ID:502,keyword:"命令词",ASR:"当前亮度",ASRTO:""}
if(snid == 502){
light = adc_read(17);
play_num((int64_t)(light * 100), 1);
}
//{ID:503,keyword:"命令词",ASR:"关闭灯光",ASRTO:"好的"}
if(snid == 503){
ASR_WS2812_27.pixel_set_all_color(0,0,0);
ASR_WS2812_27.pixel_show();
}
//{ID:504,keyword:"唤醒词",ASR:"智能管家",ASRTO:"我在"}
if(snid == 504){
}
}
void hardware_init(){
ASR_WS2812_27.pixel_init(3);
xTaskCreate(pins_attached,"pins_attached",256,NULL,4,NULL);
vTaskDelete(NULL);
}
void setup()
{
//{speak:阿文-温和男声,vol:20,speed:10,platform:haohaodada}
//{playid:10001,voice:欢迎使用人工智能AI语音助手,用智能管家唤醒我}
//{playid:10002,voice:我要退下了,用智能管家唤醒我}
//{ID:84,keyword:"命令词",ASR:"条耍改",ASRTO:"零"}
//{ID:85,keyword:"命令词",ASR:"官接思",ASRTO:"一"}
//{ID:86,keyword:"命令词",ASR:"痛官松",ASRTO:"二"}
//{ID:87,keyword:"命令词",ASR:"削丝误",ASRTO:"三"}
//{ID:88,keyword:"命令词",ASR:"景粮载",ASRTO:"四"}
//{ID:89,keyword:"命令词",ASR:"博菌避",ASRTO:"五"}
//{ID:90,keyword:"命令词",ASR:"裁纯碉",ASRTO:"六"}
//{ID:91,keyword:"命令词",ASR:"插趣悟",ASRTO:"七"}
//{ID:92,keyword:"命令词",ASR:"辞暖慌",ASRTO:"八"}
//{ID:93,keyword:"命令词",ASR:"纵猛淡",ASRTO:"九"}
//{ID:94,keyword:"命令词",ASR:"锦耗暂",ASRTO:"十"}
//{ID:95,keyword:"命令词",ASR:"燃智截",ASRTO:"百"}
//{ID:96,keyword:"命令词",ASR:"佛驻延",ASRTO:"千"}
//{ID:97,keyword:"命令词",ASR:"隔枪绍",ASRTO:"万"}
//{ID:98,keyword:"命令词",ASR:"惨愤昂",ASRTO:"亿"}
//{ID:99,keyword:"命令词",ASR:"丙迈扯",ASRTO:"负"}
//{ID:100,keyword:"命令词",ASR:"铸猜隆",ASRTO:"点"}
xTaskCreate(hardware_init,"hardware_init",256,NULL,100,NULL);
}
天问Block(标准模式)训练模型与编译烧录
实验记录视频
https://www.bilibili.com/video/BV15Q4y1g7Rb/?share_source=copy_web&vd_source=371a292a55e5ca9be994cbb4a86cc987
https://www.bilibili.com/video/BV15Q4y1g7Rb/?share_source=copy_web&vd_source=371a292a55e5ca9be994cbb4a86cc987
本帖最后由 驴友花雕 于 2023-12-15 17:27 编辑
【花雕动手做】实验十三:简版即时读取PT0603的光照度数值
实验开源代码
#include "asr.h"
extern "C"{ void * __dso_handle = 0 ;}
#include "setup.h"
#include "myLib/asr_event.h"
#include "myLib/asr_ws2812.h"
uint32_t snid;
uint16_t light;
void ASR_CODE();
void hardware_init();
//{ID:250,keyword:"命令词",ASR:"最大音量",ASRTO:"音量调整到最大"}
//{ID:251,keyword:"命令词",ASR:"中等音量",ASRTO:"音量调整到中等"}
//{ID:252,keyword:"命令词",ASR:"最小音量",ASRTO:"音量调整到最小"}
WS2812 ASR_WS2812_27(27);
/*描述该功能...
*/
void ASR_CODE(){
switch (snid) {
case 0:
digital_write((4),0);
break;
case 1:
ASR_WS2812_27.setBrightness(50);
ASR_WS2812_27.pixel_set_all_color(255,255,255);
ASR_WS2812_27.pixel_show();
break;
case 2:
ASR_WS2812_27.pixel_set_all_color(0,0,0);
ASR_WS2812_27.pixel_show();
break;
case 3:
light = adc_read(17);
//{ID:500,keyword:"命令词",ASR:"耍接官",ASRTO:"当前亮度为"}
play_audio(500);
play_num((int64_t)(light * 100), 1);
break;
}
}
void hardware_init(){
ASR_WS2812_27.pixel_init(3);
vTaskDelete(NULL);
}
void setup()
{
//{speak:云儿-温柔女声,vol:18,speed:10,platform:haohaodada,version:V3}
//{playid:10001,voice:欢迎使用人工智能AI语音助手,用智能管家唤醒我}
//{playid:10002,voice:我要退下了,用智能管家唤醒我}
//{ID:0,keyword:"唤醒词",ASR:"智能管家",ASRTO:"我在"}
//{ID:1,keyword:"命令词",ASR:"打开灯光",ASRTO:"好的,马上打开灯光"}
//{ID:2,keyword:"命令词",ASR:"关闭灯光",ASRTO:"好的,马上关闭灯光"}
//{ID:3,keyword:"命令词",ASR:"光照度",ASRTO:""}
digital_write((4),1);
//{ID:84,keyword:"命令词",ASR:"条耍改",ASRTO:"零"}
//{ID:85,keyword:"命令词",ASR:"官接思",ASRTO:"一"}
//{ID:86,keyword:"命令词",ASR:"痛官松",ASRTO:"二"}
//{ID:87,keyword:"命令词",ASR:"削丝误",ASRTO:"三"}
//{ID:88,keyword:"命令词",ASR:"景粮载",ASRTO:"四"}
//{ID:89,keyword:"命令词",ASR:"博菌避",ASRTO:"五"}
//{ID:90,keyword:"命令词",ASR:"裁纯碉",ASRTO:"六"}
//{ID:91,keyword:"命令词",ASR:"插趣悟",ASRTO:"七"}
//{ID:92,keyword:"命令词",ASR:"辞暖慌",ASRTO:"八"}
//{ID:93,keyword:"命令词",ASR:"纵猛淡",ASRTO:"九"}
//{ID:94,keyword:"命令词",ASR:"锦耗暂",ASRTO:"十"}
//{ID:95,keyword:"命令词",ASR:"燃智截",ASRTO:"百"}
//{ID:96,keyword:"命令词",ASR:"佛驻延",ASRTO:"千"}
//{ID:97,keyword:"命令词",ASR:"隔枪绍",ASRTO:"万"}
//{ID:98,keyword:"命令词",ASR:"惨愤昂",ASRTO:"亿"}
//{ID:99,keyword:"命令词",ASR:"丙迈扯",ASRTO:"负"}
//{ID:100,keyword:"命令词",ASR:"铸猜隆",ASRTO:"点"}
xTaskCreate(hardware_init,"hardware_init",256,NULL,100,NULL);
}
天问Block(标准模式)训练模型与编译烧录
实验记录视频
https://www.bilibili.com/video/BV1hw411x7hy/?share_source=copy_web&vd_source=371a292a55e5ca9be994cbb4a86cc987
https://www.bilibili.com/video/BV1hw411x7hy/?share_source=copy_web&vd_source=371a292a55e5ca9be994cbb4a86cc987
大佬出精品拉,就是有点难搞,学习啦。 _深蓝_ 发表于 2023-12-15 22:31
大佬出精品拉,就是有点难搞,学习啦。
谢谢深蓝老师的鼓励
页:
[1]