라즈베리파이를 이용한 인공지능 스피커 만들기
목원대학교 겸임교수
김영준
煎 마이크로소프트 수석연구원 헬로앱스 대표이사 Http://www.helloapps.co.kr [email protected]
Part 6
2
Hotword.py 백업
Hotword.py 백업
기존 파일을 복사한 다음, 다른 이름으로 보관
4
Trait 추가하기
Trait 코드 추가
Action Console에서 전체 Trait 선택
Trait 코드 추가
if command == "action.devices.commands.BrightnessAbsolute":
if params['brightness']:
if params['brightness'] > 50:
print('brightness > 50') else:
print('brightness <= 50')
if command == "action.devices.commands.ColorAbsolute":
if params['color']:
if params['color'].get('name') == "blue":
print('The color is blue.') else:
print('The color is not blue.')