Cov txheej txheem:

Intel Edison Weather Advisory Sketch: 6 Kauj Ruam
Intel Edison Weather Advisory Sketch: 6 Kauj Ruam

Video: Intel Edison Weather Advisory Sketch: 6 Kauj Ruam

Video: Intel Edison Weather Advisory Sketch: 6 Kauj Ruam
Video: Tech Giants Talk: 75 Years of the Transistor 2024, Kaum ib hlis
Anonim
Intel Edison Weather Advisory Sketch
Intel Edison Weather Advisory Sketch

Peb xav tsim qhov haujlwm uas muaj xim zoo nkauj, nthuav dav, thiab nthuav tawm qhov tshwj xeeb ntawm Intel Edison.

  • Siv wifi
  • Siv Linux
  • Siv cov khoom siv los ntawm Grove Starter Kit.

Ib qho ntxiv, Kuv xav paub yuav ua li cas xa cov ntaub ntawv los ntawm Linux ib sab mus rau Arduino sab ntawm Edison. Linux muaj kev nplua nuj hauv kev sib tham. Arduino nplua nuj hauv GPIO thiab muaj xim LCD thiab nthuav dav cov cuab yeej thiab cov cuab yeej.

Cov cai nyob ntawm:

github.com/qtpierce/sMegabyte/tree/master/…

  1. Thov rub qhov chaws ntawd.
  2. Siv SCP los theej Linux cov ntawv sau rau Edison. Muab lawv tso rau hauv/tsev/hauv paus/yog qhov pib zoo.
  3. Tsiv myweatherservice.service cov ntaub ntawv mus rau

    /etc/systemd/system/multi-user.target.wants/

  4. Siv Arduino IDE los teeb tsa

    WeatherAdvisorySketch.ino kos duab mus rau Arduino sab Edison.

  5. Nqa ib qho Grove Kit LCD mus rau ib qho ntawm I2C chaw nres nkoj.
  6. Xaiv tau, nqes lub suab nrov rau D2.

Kauj Ruam 1: Nqa Txoj Cai Los Ntawm GitHub

Kuv tau tshaj tawm kuv tus lej ntawm GitHub ntawm:

github.com/qtpierce/sMegabyte/tree/master/…

Ib txoj hauv kev yooj yim kom tau txais txoj cai yog mus xyuas GitHub qhov chaw thiab nrhiav lub pob "Download ZIP" thiab rub tawm cov cai. Tom qab ntawd koj yuav tsum unzip nws thiab "SCP" theej nws mus rau Edison.

Kuv siv Linux system thiab nws yog software SFTP los theej cov cai ntawm Linux mus rau Edison. Ntawm Windows, Kuv ntseeg tib qho kev luam tej zaum ua tiav siv WinSCP. Thaum kuv ua thawj qhov txuas nrog Edison siv WinSCP, nws tau muab rau kuv "Ceeb Toom - Muaj Kev Ruaj Ntseg Ruaj Ntseg!" Kuv lees txais nws vim tias kuv paub tias kuv tab tom pib txuas rau Edison. Luam cov ntawv sau hauv zip rau hauv/home/root/directory ntawm Edison. Yuav muaj cov lus qhia tom qab txav cov ntaub ntawv ib puag ncig.

Kauj Ruam 2: Txuas mus rau Edison thiab Tau Txais Command Prompt

Txoj hauv kev yooj yim tshaj plaws yog txuas rau Edison siv USB chaw nres nkoj. Kuv ua raws thawj ob peb kauj ruam ntawm:

software.intel.com/en-us/articles/assemble…

Kuv nres thaum kuv tau txais USB chaw nres nkoj txuas thiab ua haujlwm. Txij ntawm no mus, Kuv tau hais kom sai vim tias kuv tau siv Putty ntawm kuv lub Windows laptop los txuas.

Kuv tab tom siv Edison nrog Arduino Breakout Board vim kuv xav txuas Grove Starter Kit rau nws.

Kauj Ruam 3: Tshem Cov Ntaub Ntawv mus rau Lawv Qhov Chaw raug

Cov kab ntawv txuas hauv qab no tsis raug yog qhov chaw raug tso rau 3 Linux Scripts. Muaj qee qhov nyuaj cov kab ntawv cov kab ntawv uas cia siab tias cov chaw hauv qab no.

  • /home/root/myweatherservice.pl
  • /home/root/myweatherservice_wrapper.sh
  • /etc/systemd/system/multi-user.target.wants/myweatherservice.service

Thaum Edison tau pib, systemd yuav tshaj tawm myweatherservice.service

uas pib myweatherservice_wrapper.sh

uas pib myweatherservice.pl tsab ntawv.

Kauj Ruam 4: Kawm Kho Kho WiFi ntawm Koj Lub Edison

Kuv pom nws zoo siv SSH cov txheej txheem los ua cov phiaj xwm. Cov theem hauv qab no tsuas yog yam kuv xav tias tib neeg yuav tsum paub thiab xyaum. Kuv ua raws kab lus Intel ntawm teeb tsa Edison:

software.intel.com/en-us/articles/assemble…

Kuv paub tias kuv nyiam siv 2 txoj kev microUSB cable vim tias nws txuas ob qho khoom siv USB ntawm Edison mus rau lub khoos phis tawj. Ob lub cuab yeej USB yog USB tus ntiv tes xoo-tsav uas tso cai rau koj luam theej duab OS thiab USB chaw nres nkoj. Koj yuav tsum tau txais PuTTY ntu sib tham thiab tham nrog Edison hla USB chaw nres nkoj; uas yog theem 3 ntawm Intel tsab xov xwm. Koj yuav tsum tau teeb tsa wifi; uas yog theem 4 ntawm Intel tsab xov xwm. Thaum koj tau txais qhov no deb, siv USB chaw nres nkoj txuas los txiav txim tus IP chaw nyob ntawm Edison thiab tom qab ntawd siv PuTTY los ssh rau hauv Edison.

Lub hom phiaj ntawm cov kauj ruam no yog kom tau txais koj li Edison txuas nrog koj lub wifi nkag mus siv tau yog li nws tuaj yeem wget webpages los ntawm cov chaw saib huab cua.

Kauj Ruam 5: Ntxiv Grove Starter Kit Stuff

Txuas rau hauv Grove Breakout GPIO board.

Nqa RGB LCD mus rau ib qho ntawm I2C cov chaw nres nkoj ntawm Grove Breakout GPIO board.

Xaiv tau, nqes tus buzzer mus txog GPIO 3.

Kauj Ruam 6: Rov Pib Dua, Kuaj Nws, thiab Ua Nws Li Koj Li

Rov pib dua thiab tos 20 vib nas this (muaj qee qhov pw 10s hauv txoj cai) rau wifi txuas thiab wget lub chaw nres tsheb huab cua XML cov ntaub ntawv.

Yog tias nws ua haujlwm, nws yuav tsum tso saib huab cua rau chaw nres tsheb KHIO, chaw nres tsheb huab cua ntawm Hillsboro, LOSSIS tshav dav hlau.

Ua kom nws yog koj li, Linux cov ntawv sau ntawv myweatherservice.pl muaj cov lus txib wget kom nqa XML los ntawm cov chaw nres tsheb huab cua. Thov txheeb xyuas cov chaw twg uas koj xav rub cov ntsiab lus los ntawm.

Pom zoo: