Yenza ilokhi yakho kagesi ongavula ngayo umnyango wakho wegaraji ngenxa yeminwe yakho

umnyango wegaraji ufakwe ukhiye we-elekthronikhi

Sisesikhathini lapho kubonakala sengathi into ephephe kunazo zonke noma esheshayo ukusebenzisa iminwe yakho, ngokwesibonelo, ukuvula ifoni yakho ephathekayo ngisho nokuya emsebenzini, kulokhu konke kudlula kwezokuphepha okudingekayo noma okuphoqelelwe ukufeza enye iphrojekthi.

Ngaphandle kwalokhu, iqiniso ukuthi, njengephrojekthi lapho ukufunda ukuthi lolu hlobo lwedivayisi yedijithali lusebenza kanjani lungaba ngaphezu kokuthakazelisa, ngenxa yalokhu namuhla ngifuna ukukuchazela ungafaka kanjani ukhiye we-elekthronikhi womnyango wakho wegaraji ongavulwa kusetshenziswa iminwe yakho.


Ilokhi ye-elekthronikhi

Yakha ilokhi yakho ye-elekthronikhi yomnyango wakho wegaraji igxathu negxathu ongalivula ngeminwe yakho

Ukungena emininingwaneni ethe xaxa, ngikutshele ukuthi kule phrojekthi sizosebenzisa i- isithwebuli somunwe njengeSparkFun GT-511C1R. Njengoba kujwayelekile kulolu hlobo lokufundisa, kufanele kukhunjulwe ukuthi ngokuyisisekelo zonke lezi zinhlobo zemikhiqizo zinokusebenza okufana kakhulu, ngakho-ke akudingekile ukuthi kube yilo kanye lolu hlobo.

Uma unesibindi sokwenza le phrojekthi kepha unokwehluka okuthile, njengokuthi isithwebuli somunwe esisetshenzisiwe sihlukile kunaleso esifundweni noma ukuthi umnyango wegaraji lakho umane usebenzisa ezinye izinhlelo, into ezokwenzeka cishe ngamathuba aphelele, cha kungani ukwesaba, ungalandela okokufundisa kepha hhayi njengoba kunjalo kusukela lapho kuzofanele wenze okunye ukuguqulwa kokubili ezintanjeni nakwikhodi uqobo ukuyivumelanisa ne-hardware yakho.

izinto ezidingekayo

Izinyathelo ezidingekayo ukwakha isifundi sakho seminwe ongavula ngaso umnyango wegaraji

Isinyathelo 1: Ukuhlanganisa izintambo nokuSmering Sistimu Yonke

Ukuze uvule umnyango wakho wegaraji ngenxa yeminwe yomunwe wakho, uzodinga izinto ezimbili ezihlukile. Ngakolunye uhlangothi, siyakudinga yenza iphaneli yethu yokulawula, esizoyifaka ngaphandle kwekhaya lethu. Ngaphakathi kwephaneli yokulawula kuzoba lapho sizofaka khona isithwebuli seminwe, isikrini semininingwane encane nezinye izinkinobho ezingeziwe.

Okwesibili sizokudinga faka ibhokisi lesibili ngaphakathi kwegaraji uqobo. Lokhu kuzophatha ukuqinisekisa ukuthi izigxivizo zeminwe ezifakwe kuphaneli yokulawula zamukelwa noma cha uhlelo futhi, uma kwenzeka kuqinisekiswa kahle, qhubeka nokwenza isignali ebonakalayo yizimoto ezizovula umnyango wegaraji lethu.

Ukwenza lokhu sizodinga i-ATMega328p microcontroller ngubani ozophatha ngokunikeza impilo iphaneli yokulawula esizoyifaka ngaphandle kwendlu yethu ngenkathi, kwephaneli elingaphakathi sizobheja i-ATTiny. Amabhodi amabili azothintana ngokuxhumeka kwe-serial. Ukukhulisa ukuphepha kohlelo lonke, sizofaka i-transmitter ehlukanisiwe ukuze ikhadi le-ATTiny likwazi ukuvala ukuxhumana, ukuze kuthi uma i-vandal iqala iphaneli yokulawula yangaphandle, bangakwazi ukuvula umnyango wethu wegaraji ngokuwela izintambo ezimbalwa.

Uma le phrojekthi ikukholisa futhi unentshisekelo yokwenza le phrojekthi, lolu uhlu lwezinto ozozidinga:

umdwebo wephrojekthi

Kulesi sikhathi sekuyisikhathi sokuxhuma yonke i-hardware ohlwini. Umqondo, njengoba ucabanga nje, uyaqhubeka landela umdwebo otholakala ngaphezu kwale migqa, efanayo lapho ungabona ukuhlelwa kwephaneli yokulawula nemodyuli yangaphakathi. Iseluleko esisodwa engingakunika sona ukuthi unikeze izintambo zombili isiguquli samanje neLCD ubude obuthile ukuze ukwazi ukuzilengisa futhi uzilungise endaweni efanelekile ocabanga ukuthi ingaphakathi kwebhokisi elingangeni manzi langaphandle.

Uma kuleli qophelo sihlola okwesikhashana ikhodi ezogcinwa isilawuli ekugcineni, uzobona ukuthi izinkinobho zixhunywe kwizikhonkwane eziyi-12, 13 no-14, ezifeza imisebenzi yearriba','OK'futhi'phansingokulandelana. Lokhu kusho ukuthi kungaba umqondo omuhle kakhulu ukuwabeka ngale ndlela ukuze kugcinwe umqondo obonakalayo ngokuhambisana nomsebenzi wawo.

Ukuhlinzeka ngamanje kulo lonke uhlelo sizolusebenzisa, njengoba uhlu lwezinto ezidingekayo lushilo, ishaja yocingo nganoma yisiphi isixhumi se-microUSB. Umqondo wokusebenzisa lolu hlobo lweshaja ngokuyisisekelo uphendula ngokuthi zingabizi kakhulu futhi ngaphezu kwakho konke kulula ukuzithola.. Omunye umqondo ohlukile ukwazi ukunika amandla abalawuli ngokusebenzisa amabhethri, yize okwamanje kungakuhle ukusebenzisa i-transformer yamanje eshintshashintshayo ukuyiqondisa njengamanje njengoba inzwa yezigxivizo zeminwe ivamise ukusebenzisa iningi lamanje futhi, iphakela lonke uhlelo ngamabhethri okufanele uwaguqule nsuku zonke.

I-Arduino IDE

Isinyathelo 2: Ukufaka ikhodi nokusebenzisa izilawuli

Kuleli qophelo ikakhulukazi ukukutshela lokho yomibili ikhodi ezokwenziwa yi-ATMega328p kanye ne-ATTiny85 ibhaliwe futhi yahlanganiswa ne-Arduino IDE. Kulesi simo esithile kufanele sisebenzise ifayela le-garagefinger.ino ku-ATMega328p kanye nefayela elincane le-switch.ino ku-ATTiny85. Ngakolunye uhlangothi, imitapo yolwazi yeNokiaLCD.cpp neNokiaLCD.h iyimitapo yolwazi emibili yesikrini se-LCD, lokhu kuhlanganiswe kusuka ezibonelweni ezithathwe kusayithi le-Arduino futhi, cishe yonke imitapo yolwazi, kufanele ifakwe kufolda 'imilabhulali'ukuze uthole i-Arduino IDE yakho ukuzithola. Le folda imvamisa itholakala empandeni lapho ufake khona i-IDE, eWindiows imvamisa "% HOMEPATH" \ Imibhalo \ Arduino \ imitapo yolwazi. Ngikushiya amafayela wokulanda ngezansi nje kwale migqa:

Ngaphezu kwalokhu uzodinga nemitapo yolwazi ukuze isithwebuli somunwe sikwazi ukusebenza. Kuleli qophelo kufanele kukhunjulwe ukuthi ngeshwa Imitapo yolwazi exhunywe kusayithi leSparkFun ngeke isebenze njengoba yenzelwe imodeli ye-GT-511C3, kubiza kakhulu, hhayi inguqulo esiyisebenzisayo, mhlawumbe okuthile okunzima kakhulu ukukuthola kepha kushibhile kakhulu. Imitapo yolwazi esebenzayo ye-GT-511C1R ingatholakala ku- github.

Uma ngemuva kokulanda wonke amafayela futhi ubheke ikhodi oyifunayo ukuhlinzeka ngokuphepha okukhulu ohlelweni Ngiyakukhuthaza, ngokwesibonelo, ukuthola nokufaka esikhundleni sazo zonke izimo a 'isecindstring'nge-password yakho. Enye imininingwane ethakazelisa kakhulu engasiza ukwenza uhlelo lwakho luphephe kakhudlwana ukuguqula ukuguquguquka kwe-buf kufayela le-tiny_switch.ino ukuze libe nobude obufanayo ne-password ofuna ukuyisebenzisa.

Okuguqukayo overrydeCode, echazwe kufayela le-garagefinger.ino, inokumelwa okungama-8-bit kwenkinobho yokucindezela phezulu / phansi engasetshenziselwa ukuvula umnyango wakho wegaraji bese ulayisha izigxivizo zeminwe ezintsha ohlelweni ngaphandle kokusebenzisa isigxivizo somunwe esaziwayo. Lokhu kuwusizo okokuqala ngqa lapho idivayisi isetshenziswa njengoba imemori yesithwebuli izobe ingenalutho. Kungaba nentshisekelo ukushintsha leli nani lokuqala.

ukulawula kwangaphandle

Isinyathelo 3: Sihlanganisa yonke iphrojekthi

Lapho sesiwuhlolile wonke umsebenzi, sekuyisikhathi somhlangano wokugcina. Ngalokhu kufanele sikhweze yonke iphaneli yokulawula ngaphakathi kwebhokisi lethu elingangeni manzi. Njengoba ukwazi ukubona ezithombeni, ukuze kungabikho muntu ongafinyelela isilawuli, ngaphezu kwebhokisi elingangeni manzi, ibhokisi le-acrylic lisetshenzisiwe esizofaka kulo kuphela isikrini se-LCD nezinkinobho zokufinyelela, lonke uhlelo luzoba efakwe ngaphakathi kwaleli bhokisi.

Leli bhokisi kufanele libekwe ngaphandle kwekhaya lakho futhi lixhunywe ngqo ebhokisini lapho sizofaka khona i-ATTiny. Kuleli phuzu, kukukhumbuza ukuthi ku-ATTiny kufanele uxhume izintambo ukuxhumana nezimpawu kumoto ovula umnyango wakho wegaraji. Endabeni yami kwakulula kimi ngoba ngaphakathi kwegaraji uqobo nganginenkinobho yokucindezela odongeni eyayenza lo msebenzi ofanayo.

uhlelo olubekiwe

Isinyathelo 4. Usebenzisa uhlelo

Uma sesifake lonke uhlelo, kufanele sicindezele noma yiziphi izinkinobho ezintathu ukukhanyisa isikrini se-LCD kanye nesithwebuli somunwe. Kuleli qophelo, idivayisi ilinda uze ubeke umunwe kuskena. Uma umunwe owubeke kuskena uyaziwa, umnyango uzovuleka bese imenyu izokhonjiswa esikrinini ukuvula / ukuvala umnyango futhi, engeza / susa izigxivizo zeminwe, shintsha ukukhanya kwesikrini ... Idivayisi icisha cishe amasekhondi ayi-8 ngemuva kokucindezelwa kokhiye wokugcina. Ukushintsha ubude besikhathi sokulinda, kufanele ushintshe umsebenzi ukulindaButton kufayela le-garagefinger.ino.

Njengoba sishilo ezigabeni ezedlule, ungasebenzisa ukulandelana kokubhala ngaphezulu usebenzisa ama-cores phezulu / phansi alandelwe ngu 'OKukuthola ukufinyelela ohlelweni. Lokhu kuyasiza okokuqala ngqa lapho uvula khona idivayisi njengoba, okwamanje, isithwebuli singeke sibe nezigxivizo zeminwe kwimemori yaso. Ukulandelana kokuqala kunikezwa ukumelwa kanambambili okungu-8-bit kwenombolo egcinwe kokuguquguqukayo i-overrideCode kufayela le-garagefinger.ino lapho u-'1 'amelwe khona ngenkinombo ethi' phezulu 'bese kuthi' 0 'amelwe inkinobho ethi' phansi '.

Iphuzu elilodwa okufanele ulikhumbule ukuthi uma kwenzeka ushintsha ukulandelana kokukhishwa futhi kamuva ukukhohlwe ngaphandle kokufaka izigxivizo zeminwe kudivayisi, idivayisi izokhiywa kahle futhi kuzofanela uphinde uhlele kabusha i-ATMega328p bese uphoqa i-EEPROM ukusula ukusula ikhodi .

Ukwaziswa okwengeziwe: abafundiswayo


Okuqukethwe yi-athikili kunamathela ezimisweni zethu ze izimiso zokuhlelela. Ukubika iphutha chofoza lapha.

Yiba ngowokuqala ukuphawula

Shiya umbono wakho

Ikheli lakho le ngeke ishicilelwe. Ezidingekayo ibhalwe nge *

*

*

  1. Ubhekele imininingwane: Miguel Ángel Gatón
  2. Inhloso yedatha: Lawula Ugaxekile, ukuphathwa kwamazwana.
  3. Ukusemthethweni: Imvume yakho
  4. Ukuxhumana kwemininingwane: Imininingwane ngeke idluliselwe kubantu besithathu ngaphandle kwesibopho esisemthethweni.
  5. Isitoreji sedatha: Idatabase ebanjwe yi-Occentus Networks (EU)
  6. Amalungelo: Nganoma yisiphi isikhathi ungakhawulela, uthole futhi ususe imininingwane yakho.