Cov txheej txheem:

Huab Cua Matrix Zaub: 4 Cov Kauj Ruam (nrog Duab)
Huab Cua Matrix Zaub: 4 Cov Kauj Ruam (nrog Duab)

Video: Huab Cua Matrix Zaub: 4 Cov Kauj Ruam (nrog Duab)

Video: Huab Cua Matrix Zaub: 4 Cov Kauj Ruam (nrog Duab)
Video: Tsis Deev Koj Thiaj Tsis Seev BY Aka 2024, Kaum ib hlis
Anonim
Huab Cua Matrix Zaub
Huab Cua Matrix Zaub
Huab Cua Matrix Zaub
Huab Cua Matrix Zaub

Txog txoj haujlwm

Kuv yuav qhia koj li cas los tsim cov xwm txheej huab cua me me los ntawm 8x8 matrix zaub.

Kuv yuav siv Genuino MKR1000 txhawm rau nqa qhov ntsuas kub, av noo thiab huab cua ntawm thaj chaw xaiv.

Qhia cov xwm txheej los tso tawm hauv cov duab swb cov qauv.

Kev sib tw

Txij li 8x8 Matrix yog qhov tseem ceeb ntawm cov LEDs, Kuv yuav xav tau program nws los qhia cov ntawv thiab cov tsiaj ntawv cuam tshuam

Hauv qhov haujlwm no koj tseem yuav kawm paub yuav ua li cas

  1. siv so qhov kev pabcuam web api
  2. yuav ua li cas cais cov ntaub ntawv Json
  3. yuav siv xov thiab Wifi tsev qiv ntawv hauv Arduino li cas

Kauj Ruam 1: Sib sau ua ke MKR1000 thiab 8x8 Zaub rau Mini Bread Board

Sib sau ua ke MKR1000 thiab 8x8 Zaub rau Mini Bread Board
Sib sau ua ke MKR1000 thiab 8x8 Zaub rau Mini Bread Board
Sib sau ua ke MKR1000 thiab 8x8 Zaub rau Mini Bread Board
Sib sau ua ke MKR1000 thiab 8x8 Zaub rau Mini Bread Board
Sib sau ua ke MKR1000 thiab 8x8 Zaub rau Mini Bread Board
Sib sau ua ke MKR1000 thiab 8x8 Zaub rau Mini Bread Board

Kev teeb tsa yog yooj yim zoo nkauj, peb tsuas yog yuav tsum tau xa cov 8x8 matrix zaub rau peb lub microcontroller.

Yuav tsum muaj

  1. 16pcs Txiv neej rau Poj Niam dhia
  2. Mini Cij Board
  3. Microcontroller
  4. 8x8 Matrix Zaub '

Los Ua Ke Zaub

Faib koj cov neeg dhia mus rau pawg ntawm 8pcs.

Nco ntsoov tias cov xov hlau jumper tau ua tiav zoo.

Txuas 8 tus poj niam dhia mus rau thawj 8 tus pin ntawm matrix zaub.

Txuas lwm 8 tus poj niam dhia mus rau tus thib 8 8 tus pin ntawm matrix zaub.

Txuas rau microcontroller

Txuas lub microcontroller mus rau lub khob cij mini

Siv qhov kawg txiv neej tus pin ntawm cov xov hlau jumper, ntxig rau ntawm thawj 8 qhov uas microcontoller pins txuas (5-A5).

Ntxig qhov seem ntawm lwm qhov 8 qhov uas microcontoller pins txuas (6-13).

Kho qhov 8x8 Matrix Display yog li nws tau tig rau pem hauv ntej thaum koj tso nws rau ntawm lub rooj.

Kauj ruam 2: Tsim Koj Tus Huab Cua Api Account

Tsim Koj Tus Huab Cua Api Account
Tsim Koj Tus Huab Cua Api Account
Tsim Koj Tus Huab Cua Api Account
Tsim Koj Tus Huab Cua Api Account

Txhawm rau kom raug hu ua Internet of Things, peb yuav tsum nqa qee cov ntaub ntawv los ntawm is taws nem.

Kuv siv APIXU API los nqa cov ntaub ntawv huab cua los ntawm kuv qhov chaw xaiv.

Sau npe rau tus as khauj ntawm no https://www.apixu.com/login.aspx thiab tau txais koj tus lej API tus lej.

Ua siab dawb siv kuv tus kheej tus lej api

Txoj hlua apiKey = "8f0ff191defb4a20b5583518171203"; // koj tus lej apixu api

Kauj Ruam 3: Nyem Koj MKR1000

Tau txais cov lej tag nrho Saib ntawm GitHub

Xav tias dawb xa cov teeb meem lossis hloov kho:)

Ntxiv HexFont.h rau koj lub tsev qiv ntawv Arduino.

Siv yooj yim_weather_display.ino los nyem koj lub microcontroller.

Ntawm qhov no ntawm txoj cai:

Hloov nrog koj qhov chaw teeb tsa WiFi

char ssid = ""; // koj lub network SSID (lub npe)

char pass = ""; // koj tus password network (siv rau WPA, lossis siv tus yuam sij rau WEP)

Hloov nrog koj tus Apixu Api Key thiab qhov chaw tswj hwm

Txoj hlua apiKey = "8f0ff191defb4a20b5583518171203"; // koj tus lej apixu api

Txoj hlua tswj = "28.4810971, -81.5088347"; // koj qhov chaw tswj hwm

Koj kuj tseem tuaj yeem hloov pauv cov ntaub ntawv twg los ua kom pom ntawm ntu no ntawm cov cai

// hloov kho cov ntawv nyeem rau huab cua tshiab

lus = ""; // tau txais qhov xwm txheej tam sim no String condition = result ["current"] ["condition"] ["text"]; appendMessage (xwm txheej); appendMessage (""); Txoj hlua temp_c = tshwm sim ["tam sim no"] ["temp_c"]; appendMessage (temp_c); appendMessage ("C"); appendMessage (""); String humidity = tshwm sim ["tam sim no"] ["av noo"]; appendMessage (av noo); appendMessage ("H"); appendMessage ("");

Piv txwv li yog tias koj xav ntxiv cua_mph los ntawm apixu api qhov tshwm sim:

String wind_mph = result ["current"] ["wind_mph"];

appendMessage (cua_mph); appendMessage ("Cua mph"); appendMessage ("");

Tau txais tag nrho cov cai ntawm no Saib ntawm GitHub

Kauj ruam 4: Ua tiav

Image
Image

Thaum flashed nws yuav sim txuas rau koj li WiFI thiab yuav nqa koj cov huab cua, kub thiab av noo!

Nco ntsoov tias koj muaj internet txuas.

Xav Tau Kev Pab?

Xav tias dawb los tawm tswv yim ntawm no.

Txhawb nqa txoj haujlwm los ntawm Github repo no

github.com/imjeffparedes/iot-simple-weath…

Kuj Thov pov npav rau kuv hauv Internet ntawm Kev Sib Tw Yam.:)

Internet of Things Contest 2017
Internet of Things Contest 2017

Qhov khoom plig thib ob hauv Internet ntawm Yam Kev Sib Tw 2017

Pom zoo: