-
Notifications
You must be signed in to change notification settings - Fork 1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
虽然虾哥说了iot不完善,但还是想问一下 #204
Comments
|
解决了,无论书房灯还是客厅灯都执行lamp的函数应该是因为,示例程序只有一个“灯”,增加书房灯后不再混淆
2 iot/things文件夹增加一个bookroomlamp类,当然还要增加一些变量用(不详述)
3 找到自己硬件对应的主板文件 我的是boards/bread_compat_wifi/compat_wifi_board.cc,在InitializeIot() 函数中增加自己的设备
4 题外:巴法云上面注册一个mqtt设备8266light,8266设备通过订阅巴法云相关主题实现控制 |
Wow,已经可以工作了吗,可以发个视频看看效果。 你自己定义的iot类,可以写在开发板目录下。后面看能不能改进一下iot的功能,比如定义一个灯的class,但是可以创建多个出来,传入不同的参数名字,这样就能解决很多灯,但是只需要实现一次。 |
好的虾哥,我研究下看看能不能一个类控制一类设备 Video_1740218896647.mp4 |
可能要修改thing和thing manager来支持生成多个灯的实例,但是通过传入不同的参数和描述来区别。 |
1.语音识别后,执行iot部分指令,为啥无论是说:“关闭客厅灯”“关闭书房灯”,小智都会执行lamp的turnoff不区分设备?
2.用gpio口控制其他设备可能就在机器人、小车方面应用多一些;智能家居使用的话,可能更多的会使用到mqtt的publish功能,请问这样的话是不是需要自己初始化一个mqtt类(使用巴法云或者其他云)来实现智能设备无线控制?
The text was updated successfully, but these errors were encountered: