Cov txheej txheem:
- Kauj Ruam 1: Kho AVS ntawm Dragonboard
- Kauj Ruam 2: Tsim Alexa Skills
- Kauj Ruam 3: Teeb tsa AWS Lambda
- Kauj ruam 4: Khiav Koj Daim Ntawv Thov
- Kauj Ruam 5: Xaus
Video: Yuav Ua Li Cas Sib Tham Alexa Nrog Dragonboard-410c: 5 Kauj Ruam
2024 Tus sau: John Day | [email protected]. Kawg hloov kho: 2024-01-30 09:27
Nrog rau qhov kev qhia no koj yuav kawm paub yuav ua li cas ntxiv Alexa hauv Dragonboard-410c. Ua ntej pib, cia peb qhia qee yam khoom uas koj xav tau:
Kev Pabcuam Alexa Lub Suab (AVS) - Ua kom muaj peev xwm tham nrog koj cov cuab yeej, koj yuav tuaj yeem nkag mus rau huab raws alexa uas muab AVS Apis. Hais cov lus tsa "Alexa" koj tuaj yeem tham nrog cov cuab yeej thiab tau txais lub suab teb tam sim
Alexa Skills - Koj tuaj yeem cuam tshuam nrog kev paub tus kheej, kev txawj ntse alexa txhais tau tias muaj peev xwm sib txawv uas koj tuaj yeem tsim lossis siv nrog Alexa Skill Kit (ASK)
AWS Lambda - Tso cai rau koj ua txoj cai yam tsis tas yuav tswj hwm tus neeg rau zaub mov, tsuas yog xav tias koj yuav tsum tau ua yog sau koj cov cai thiab lambda yuav tswj hwm txhua yam
Kauj Ruam 1: Kho AVS ntawm Dragonboard
- Tsim tus as khauj hauv Amazon Developer.
- Sau npe koj cov khoom tom qab qhov kev qhia no.
- Hauv koj lub davhlau ya nyob twg:
Clone qhov chaw cia khoom no:
$ git clone
Mus rau:
$ cd CoffeeMachine-alexa/DragonBoard410c/CoffeeMachine/sau ntawv
Thiab ua:
#./setup.sh
Ntawm tsab ntawv ua tiav koj yuav tsum teb qee cov lus nug:
Nco tseg: Yog tias koj yog tus neeg siv qib siab, koj tuaj yeem nruab qhov pib tsab ntawv tus kheej thiab kho kom nws cuam tshuam koj txoj kev teeb tsa, tab sis peb tsis muab kev lees paub. Cuam tshuam? (Y/n)? n
- Koj siv lub operating system twg? Koj OS [debian]: debian
- Koj siv lub operating system twg? Koj lub cuab yeej [raspberrypi]: lwm yam
- Koj puas tseem xav txhim kho Airplay txhawb nqa (Y/n)? n
Cov lus nug tom ntej no koj yuav tsum teb txog koj li ntaub ntawv xov xwm ntaus cim yav dhau los.
4. Qhib nplaub tshev:
$ cd CoffeeMachine-alexa/DragonBoard410c/CoffeeMachine
5. Kho cov ntaub ntawv ClientAWS.py:
Teem koj cov ntaub ntawv raws li koj tus as khauj AWS thiab daim ntawv pov thawj tsim:
host = tus tswv chaw nyob los ntawm koj li AWS IOT tus lej kawg.
rootCAPath = txoj hauv kev rau daim ntawv pov thawj rootCA rub tawm. certificatePath = txoj hauv kev rau daim ntawv pov thawj rub tawm. privateKeyPath = txoj hauv kev rau tus yuam sij ntiag tug rub tawm. clientID = tus cim rau koj cov neeg siv mqtt.
Yog xav paub ntxiv txog yuav tsim daim ntawv pov thawj li cas, thov txheeb xyuas qhov txuas no.
Kauj Ruam 2: Tsim Alexa Skills
Txhawm rau tsim Alexa cov txuj ci qee cov ntsiab lus tseem ceeb kom nkag siab cov txheej txheem:
-
Lub npe hu - Lub npe ntawm koj lub cuab yeej. Nws yuav tsum tau thov kom ntaus ntawv ua ib yam dab tsi.
Piv txwv: "Alexa, thov tshuab kas fes kom qhib".
-
Hom qhov - Cov lej uas tuaj yeem hloov pauv cov xeev tau teev tseg.
Piv txwv: "Alexa, nug lub tshuab kas fes ua kas fes ntev" lossis "Alexa, nug lub tshuab kas fes ua kas fes luv"
- Kev nkag siab - Ua kom txaus siab rau tus neeg siv kab lus hais.
-
Cov Lus Piv Txwv - Cov kab lus uas koj yuav hais rau Alexa ua qee yam. Nws muaj lub npe hu thiab hom kab.
Piv txwv: "TurnCoffeMachine {CoffeeState} lub tshuab kas fes" txhais tau tias "qhib/kaw lub tshuab kas fes".
- Nrog koj tus amazon tus tsim tawm tus lej nkag mus, mus rau txuj ci.
- Ua raws li qhov kev qhia no los tsim cov txuj ci tshwj xeeb.
- Tam sim no koj yuav tsum txhais lub npe hu ua zoo li lub tshuab kas fes.
-
Rau qhov ua piv txwv no, cia peb tsim 2 hom kab.
-
COFFEE_STATE ntxiv qhov tseem ceeb:
- nyob rau
- tawm
-
COFFEE_TYPE ntxiv qhov tseem ceeb:
- luv
- ntev
-
-
Thaum kawg cia tsim 2 kev xav. Kev nkag siab yog kab lus uas koj yuav hais rau Alexa ua qee yam.
-
TurnCoffeeMachine
-
Ua raws cov duab txuas uas muaj cov ntsiab lus hais txog Utterances.
-
MakeCoffee
Ua raws cov duab txuas uas muaj cov ntsiab lus hais txog Utterances.
-
Kauj Ruam 3: Teeb tsa AWS Lambda
AWS Lambda muab txoj cai ua haujlwm yam tsis tas yuav tsum muaj kev tswj hwm lossis tswj hwm cov servers. Nws sau tus lej nkaus xwb thaum xav tau, feem ntau cov haujlwm no tau thov los ntawm Alexa Kev Txawj Ntse thiab ua tiav thaum tus neeg siv hais lus ntau hom lus txib.
Cia peb tsim txoj haujlwm lambda tsim nyog rau lub tshuab kas fes ua haujlwm. Cov haujlwm no tau thov los ntawm cov txuj ci tshwj xeeb uas tsim los ntawm cov lus qhia no.
Yuav tsum:
Active AWS account
- Txhawm rau pib tsim cov haujlwm lambda kos npe rau hauv lub console.
- Qhib cov kev pabcuam Lambda thiab mus rau cov haujlwm.
-
Xaiv tsim cov haujlwm, txhais lub npe thiab teeb tsa lub sijhawm rau Python 2.7
-
Tom qab koj tsim koj lub luag haujlwm, koj yuav tsum ntxiv qee txoj cai.
- Mus rau IAM thiab xaiv koj lub luag haujlwm uas tau hais tseg thaum tsim txoj haujlwm lambda.
- Txuas txoj cai AWSIoTFullAccess. (Cia lambda tshaj tawm cov ntaub ntawv)
-
- Qhib koj txoj haujlwm Lambda thiab ntxiv qhov ua rau Alexa Skills (qib 2 siv).
- Teem kab ntawv txuas rau koj txoj haujlwm lambda.
Kauj ruam 4: Khiav Koj Daim Ntawv Thov
- Txuas lub microphone ntawm Dragonboard-410c
- Ua daim ntawv thov:
$ cd CoffeeMachine-alexa/DragonBoard410c/CoffeeMachine
$ python main.py
3. Hais "Alexa" thiab tos lub suab teb.
Kauj Ruam 5: Xaus
Los ntawm kev ua cov theem no koj Dragonbord-410c tau npaj los muab kev sib txuas lus nrog Alexa, thiab koj yuav tuaj yeem tsim txhua hom iot ntaus ntawv tswj los ntawm Alexa.
Ua kom tiav Cov Lus Qhia:
- Tshuab Kas Fes Nrog Android App Siv DragonBoard 410c thiab CSR1011
- Txuas Android Daim Ntawv Thov Nrog AWS IOT thiab nkag siab lub suab lees paub API
Pom zoo:
Kev Sib Tham Sib Tham Punching Hnab: 3 Cov Kauj Ruam (nrog Duab)
Interactive Reflex Punching Bag: Cov lus qhia no yog rau txhua tus neeg uas xav txhim kho lawv cov kev txawj ntse thiab kev txawj ntaus nrig thaum tau txais kev paub ntau dua, siv Arduino, LED's thiab MK 2125 Accelerometer
THIAB LUB NEEJ !! (Sib tham sib tham rooj sib tham): 4 Kauj Ruam
THIAB LUB NEEJ !! (sib tham sib tham txog Thruth Table): Nyob zoo cov phooj ywg, Kuv vam tias koj txhua tus nyob hauv koj lub tsev zoo thiab xav tsis thoob dab tsi ntawm cov ntaub ntawv uas muaj ?? Nkag siab cov rooj vag logic yog qhov tseem ceeb heev rau ob leeg
Qhov Sib Txawv Ntawm Lub Rooj Sib Tham Lub Rooj Sib Tham Lub Hwj Huam!: 6 Kauj Ruam (nrog Duab)
Qhov Sib Txawv Ntawm Lub Rooj Sib Tham Bench Power Supply!: Koj puas tau tsim koj qhov haujlwm tshiab thiab tuav rov qab los ntawm qhov koj tsis muaj kev tswj hwm koj li peev txheej? Zoo, qhov no yog qhov haujlwm rau koj! Hnub no kuv yuav qhia koj yuav ua li cas thiaj tsim tau lub rooj zaum hauv lub rooj zaum ua haujlwm tau zoo rau qhov pheej yig heev! Kuv tau ua qhov no tag nrho
Yuav Ua Li Cas Siv IRC (Internet Sib Tham Sib Tham): 5 Kauj Ruam
Yuav Ua Li Cas Siv IRC (Sib Tham Sib Tham Hauv Is Taws Nem): [Kho] Qhov no yog Cov Lus Qhia uas yog lub hauv paus rau cov uas tseem tsis tau nkag siab txog Kev Sib Tham Hauv Is Taws Nem, lossis IRC. Txoj haujlwm no tsis yog npaj los npog tag nrho cov peev txheej ntawm IRC thiab txhua tus neeg siv khoom lub peev xwm, tab sis yog lub hom phiaj kom yeej
Yuav Ua Li Cas Txuas Lub Rooj Sib Tham Sib Tham thiab Microphone Snake rau Lub Suab: 3 Kauj Ruam
Yuav Ua Li Cas Txuas Lub Rooj Sib Tham Sib Tham thiab Microphone Snake rau Lub Suab: Cov vis dis aus npog cov hauv paus ntawm kev txuas lub suab sib xyaw (sib xyaw board lossis console) rau lub suab siv siv lub microphone nab cable. Nws npog lub microphone thiab xa kev sib txuas. Yog xav paub ntxiv: http://proaudiotraining.com