Cov txheej txheem:

LCD Bus Teem Sijhawm Zaub: 7 Kauj Ruam
LCD Bus Teem Sijhawm Zaub: 7 Kauj Ruam

Video: LCD Bus Teem Sijhawm Zaub: 7 Kauj Ruam

Video: LCD Bus Teem Sijhawm Zaub: 7 Kauj Ruam
Video: Часы G Shock до 100 долларов-15 лучших часов Casio G Shock до 100 дол... 2024, Hlis ntuj nqeg
Anonim
LCD Bus Sijhawm Zaub
LCD Bus Sijhawm Zaub

Txheem 18

Cov tub ntxhais kawm yuav txhim kho kev nkag siab thiab muaj peev xwm xaiv thiab siv thev naus laus zis thauj mus los.

Benchmark 18-J Tsheb thauj mus los ua lub luag haujlwm tseem ceeb hauv kev ua haujlwm ntawm lwm cov thev naus laus zis, xws li kev tsim khoom, kev tsim kho, kev sib txuas lus, kev noj qab haus huv thiab kev nyab xeeb, thiab kev ua liaj ua teb.

Koj puas tau xiam tsheb npav? Koj puas tau xav tias koj muaj lub vijtsam yooj yim uas pom tias cov tsheb npav tuaj txog hauv lub sijhawm tiag? Tom qab ntawv Cov Lus Qhia no yog rau koj! Nrog tsuas yog cov khoom siv yooj yim Arduino, tso saib LCD thiab qee qhov kev yooj yim, koj tuaj yeem tsim kev lom zem thiab txoj hauv kev tshiab kom tsis txhob caij npav dua. Cov zaub LED no tuaj yeem txuas rau txoj kev tsheb npav siv lub app API los qhia cov neeg tuaj txog thaum lawv tshwm sim, thiab nws kuj tseem tuaj yeem kho kom pom cov lus tshwj xeeb. Cia peb mus rau kauj ruam 1!

Kauj ruam 1: Cov Khoom

Cov Khoom
Cov Khoom

Txhawm rau pib, koj yuav tsum tau txais koj txhais tes ntawm cov cuab yeej raug. Rau qhov piv txwv no, peb tau siv SparkFun Inventor's Kit v 3.2; yog tias koj muaj cov khoom siv no, nws yuav yooj yim dua ua raws. Txawm li cas los xij, nws yuav tsum muaj peev xwm tsim cov phiaj xwm no yam tsis muaj cov khoom siv no. Txhua yam koj yuav xav tau yog Arduino, lub khob cij, qee lub xov hlau jumper, lub hwj chim, thiab LCD zaub. Koj kuj tseem yuav tsum rub tawm Arduino qhov qhib software, uas tuaj yeem pom ntawm www.arduino.cc. Cov khoom siv SparkFun los nrog phau ntawv qhia, uas suav nrog cov duab feem ntau. Peb yuav ntxiv cov duab, tab sis kuj suav nrog kev piav qhia ntxiv los ntawm cov ntawv. Ib yam li ceeb toom, yog tias koj tsis siv cov khoom siv no, cov pins txuas ntawm Arduino thiab LED cov duab yuav txawv me ntsis, yog li sim ua kom tau cov khoom zoo sib xws tshaj plaws uas koj tuaj yeem ua tau.

Kauj Ruam 2: Nkag Siab Cov Cheeb Tsam

Nkag siab Cov Cheeb Tsam
Nkag siab Cov Cheeb Tsam

Raws li peb koj twb tau xav lawm, peb yuav tsum txuas Aurdino kom raug rau lub vijtsam LCD kom nws yuav tso saib cov ntaub ntawv tsim nyog. Qhov no xav tau cov lus qhia ntawm Arduino, thiab tso tawm los ntawm Arduino rau cov zaub. Arduino ua raws li lub tshuab computer, ua cov ntaub ntawv nws tau txais los ntawm cov software thiab tso tawm cov cim hluav taws xob tsim nyog rau cov zaub. Cov zaub tau txais cov cim no, thiab tig teeb lub LCD ib tus neeg, uas tsim cov lus. Lub khob cij tso cai rau peb txuas cov zaub rau Arduino ntawm cov xov hluav taws xob. Potentiometer ua raws li tus tswj hluav taws xob, nce lossis txo qhov tsis kam, uas hloov pauv tus nqi ntawm qhov hluav taws xob uas mus txog cov zaub; ib tus resistor tuaj yeem siv rau hauv nws qhov chaw, tab sis yuav xav tau ntau qhov kev sim-thiab-yuam kev txhawm rau txhawm rau txhawm rau nrhiav qhov raug ntawm qhov tsis kam. Koj tuaj yeem xav txog lub zog ntsuas hluav taws xob ua lub pob qhov rooj ntawm lub xov tooj cua, vim nws tuaj yeem hloov qhov hluav taws xob nce lossis nqis.

Kauj Ruam 3: Siv Breadboard

Siv Breadboard
Siv Breadboard

Tam sim no, tej zaum koj twb tau tsis meej pem lossis raug hem los ntawm lub khob cij. Yog tias nws yog koj thawj zaug siv ib qho, koj yuav tsis paub yuav ua li cas cov cim raug xa los ntawm cov dav hlau. Muaj ob hom kev tsheb nqaj hlau ntawm daim ntawv qhia zaub mov: cov kab hluav taws xob, uas tau qhia los ntawm a + lossis - kos npe thiab muaj kab txaij liab thiab xiav khiav nrog lawv, thiab cov davhlau ya nyob twg, uas hloov cov cim. Txhawm rau ua kom yooj yim dua, koj yuav tsum qhia koj lub khob cij ib yam nkaus li ib qho hauv daim duab no tau hais qhia, vim nws yog qhov peb nyob li cas. Rau lub khob cij ua haujlwm, lub zog tau nkag los ntawm lub hwj chim los rau + txoj kev tsheb nqaj hlau, thiab hauv av txuas nrog los ntawm txoj kev tsheb nqaj hlau mus rau hauv av. Lub hwj chim taug kev hla txoj kab tsheb ciav hlau, yog li yog lub zog thiab cov xov hlau hauv av tau txuas rau sab laug sab laug + thiab - txoj kab, sab xis sab xis + thiab - txoj kab yuav tso tawm lub zog ntawd. Cov davhlau ya nyob twg, txawm li cas los xij, hloov cov paib ntsug, yog li cov xov txuas uas txuas nrog rau A1 davhlau ya nyob twg yuav hloov lub teeb liab raws tag nrho thawj kab; uas yog, cov davhlau ya nyob twg B1, C1, D1, thiab E1 yuav tso tawm tib lub teeb liab uas tau nkag los ntawm A1. Qhov no tseem ceeb heev, zoo li yog tias koj muab ob lub tswv yim tso rau hauv ib kab, koj yuav tsis tau txais qhov kev cia siab. Raws li koj tuaj yeem pom, daim ntawv qhia zaub mov tau faib ua kab rov tav nqes nruab nrab ntawm ib sab toj; lub ridge no cais ob qho ib nrab ntawm lub khob cij kom lub teeb liab los ntawm A1 yuav hloov mus rau E1, tab sis yuav tsis hloov mus rau F1. Qhov no tso cai rau ntau qhov kev tawm tswv yim kom haum rau ntawm ib daim ntawv qhia zaub mov. Lub zog tseem yuav tsum txuas nrog los ntawm txoj kab tsheb nqaj hlau mus rau lub tsheb nqaj hlau dav hlau uas xav tau lub zog, vim tias txoj kev tsheb nqaj hlau tsuas yog siv hluav taws xob xwb, thiab lub zog yuav tsum tau khaws los ntawm txoj kev tsheb nqaj hlau thiab xa mus rau ib qho twg uas xav tau lub zog.

Kauj Ruam 4: Sib Sau Cov Zaub

Sib Sau Zaub
Sib Sau Zaub
Sib Sau Zaub
Sib Sau Zaub

Tam sim no nws yog lub sijhawm los teeb tsa cov duab LCD! Pib los ntawm kev qhia koj cov duab ib yam nkaus peb muaj peb li, nrog cov lej kab nce los ntawm sab laug mus rau sab xis. Koj tuaj yeem siv thawj daim duab los ua phau ntawv qhia thiab ua kev sib txuas hauv txhua qhov kev txiav txim uas koj xav tau, lossis koj tuaj yeem ua raws nrog daim duab thib ob los txuas cov khoom sib txuas thiab cov xov hlau. Raws li peb tuaj yeem pom, 5V lub zog uas tau tso tawm los ntawm Arduino tau xa mus rau txoj kev tsheb nqaj hlau ntawm lub khob cij, thiab lub zog no tau nkag los ntawm ob tus pin ntawm LCD zaub ntxiv rau lub zog ntsuas. Tus so ntawm lub davhlau ya nyob twg txuas nrog rau ntawm Arduino, thiab lub teeb liab cov pins tso tawm no yog ua raws tus lej koj sau rau Arduino. Thaum koj tau txais txhua yam txuas nrog, nws yog lub sijhawm los sau cov cai!

Kauj ruam 5: Txoj Cai

Txoj Cai
Txoj Cai
Txoj Cai
Txoj Cai

Thaum sau cov cai rau koj Arduino, koj yuav tsum paub tseeb tias koj siv software raug. Txhawm rau rub tawm cov software, mus rau www.arduino.cc. Hauv qab "software" tab, koj tuaj yeem siv lub web-based client lossis rub tawm cov software software ncaj qha rau koj lub computer. Peb pom zoo rub tawm cov software, vim nws yuav yooj yim dua los kho qhov chaws vim nws nyob hauv ib cheeb tsam thiab yuav tsis xav tau kev sib txuas hauv is taws nem.

Nov yog qhov piv txwv ntawm CTA tuaj txog sijhawm tso saib:

github.com/gbuesing/arduino-cta-tracker/bl…

Txawm li cas los xij, qhov no yog tsim hauv Python platform.

Kauj Ruam 6: Txuas rau API rau Kev Hloov Kho Lub Sijhawm Tshiab

Txuas mus rau API rau Kev Hloov Kho Lub Sijhawm Tshiab
Txuas mus rau API rau Kev Hloov Kho Lub Sijhawm Tshiab
Txuas mus rau API rau Kev Hloov Kho Lub Sijhawm Tshiab
Txuas mus rau API rau Kev Hloov Kho Lub Sijhawm Tshiab
Txuas rau API rau Kev Hloov Kho Lub Sijhawm Tshiab
Txuas rau API rau Kev Hloov Kho Lub Sijhawm Tshiab

Txog cov kauj ruam kawg no, peb yuav txuas rau Arduino chav nyob rau hauv ib qho app uas yuav tso cai rau tso saib kom pom cov xov xwm tshiab ntawm cov caij tsheb npav. Txhawm rau ua qhov no, peb yuav siv lub app API thiab koom ua ke rau hauv peb qhov system.

API yog dab tsi? (Application Programming Interface) API yog lub npe luv rau Application Programming Interface, uas yog software nruab nrab uas tso cai rau ob daim ntawv thov los sib tham. Txhua lub sijhawm koj siv app zoo li Facebook, xa xov sai, lossis tshawb xyuas huab cua ntawm koj lub xov tooj, koj siv API.

Piv Txwv Li Cas ntawm API? Thaum koj siv daim ntawv thov ntawm koj lub xov tooj ntawm tes, daim ntawv thov txuas rau Is Taws Nem thiab xa cov ntaub ntawv mus rau server. Tom qab ntawd tus neeg rau zaub mov khaws cov ntaub ntawv ntawd, txhais nws, ua cov haujlwm tsim nyog thiab xa rov qab rau koj lub xov tooj. Daim ntawv thov tom qab ntawd txhais cov ntaub ntawv ntawd thiab nthuav qhia koj nrog cov ntaub ntawv koj xav tau hauv txoj kev nyeem tau. Nov yog qhov API yog - txhua qhov no tshwm sim ntawm API.

Peb yuav siv Transloc Lub Vev Xaib txhawm rau taug qab cov sijhawm teem caij npav, yog li peb pom zoo siv cov peev txheej no kom yooj yim ua raws.

Piv txwv:

1. Mus rau TransLoc Wolfline lub vev xaib txhawm rau txiav txim siab qhov nres thiab txoj hauv kev koj xav taug qab

feeds.transloc.com/3/arrivals?agencies=16&…

2. Mus rau mashape, xaiv Transloc, tsim ib tus as khauj, thiab nkag mus rau API.

market.mashape.com/transloc/openapi-1-2#

Kauj ruam 7: Troubleshooting

Teeb meem
Teeb meem

Zoo, yog tias koj cov zaub ua haujlwm yam tsis muaj teeb meem, ces koj yuav tsis xav tau cov kauj ruam no! Yog tias koj lub vijtsam ua haujlwm tsis raug, lossis tsis tso saib cov ntaub ntawv raug, qee qhov kev daws teeb meem yooj yim yuav xav tau. Ua ntej, xyuas kom txhua yam sib xyaw ua ke sib xws, thiab paub tseeb tias cov software koj siv yog ib qho tshiab tshaj plaws lossis cov uas tau sib xws nrog koj Arduino. Tom ntej no, xyuas kom txhua qhov kev sib txuas raug, thiab tias Arduino tau txais ob lub zog thiab cov ntaub ntawv los ntawm koj lub computer. Txhawm rau sim yog tias Arduino tau txais lub zog thiab cov ntaub ntawv, koj tuaj yeem tsim cov ntawv sau rau LCD los tso rau hauv koj tus lej; cov ntawv sau yuav tsum tshwm ntawm lub vijtsam. Koj tseem tuaj yeem siv lub ntsuas hluav taws xob lossis ntsuas qhov ntsuas kom ntseeg tau tias muaj lub zog. Yog tias koj siv lub ntsuas ntsuas ntsuas, ntsuas qhov ntsuas hluav taws xob raws cov kab hluav taws xob, thiab saib rau 5V. Yog tias qhov hluav taws xob qis heev, koj yuav muaj kev puas tsuaj lossis ua haujlwm tsis zoo ntawm Arduino lossis cov kab hluav taws xob nkag. Yog tias txhua qhov kev sib txuas tau raug, thiab cov duab tsis pom cov lus, koj yuav xav tau kho koj lub zog kom txog thaum lub teeb pom kev zoo dua qhov koj xav tau. Txheeb xyuas kom paub tseeb tias tsis muaj ib lub xov hlau jumper puas los yog puas, thiab nco ntsoov tias cov zaub LCD thiab Arduino tau ua haujlwm thiab tsis raug puas tsuaj. Yog tias koj paub tias LCD tau txais lub zog, tab sis tsis tau nthuav tawm cov lus raug, ua ob zaug kos cov cai kom ntseeg tau tias nws raug. Thaum kawg, yog tias koj lub vijtsam tsis qhia lub sijhawm caij tsheb npav raug, koj yuav tsum tau tshuaj xyuas API uas koj tau ntxiv kom nws raug thiab siv tau nrog koj cov cai.

Pom zoo: