Namhlanje sibuya nenye yezifundo zethu ezinomdla. Ngeli xesha ndifuna ukukubonisa iprojekthi elula kakhulu eya kukuthatha ixesha elifutshane ukuyiphumeza kwaye ngalo uya kuba nakho ukwakha uhlobo lomguquleli ukusuka kulwimi olubhalelwe ikhowudi yeMorse. Njengesiqhelo, inyani kukuba asizukuya ngaphaya kweprojekthi apho i ipleyiti yesonka kunye ibhodi ye-arduino Ukusukela, ukuba ufuna ukuqhubela phambili, kokubini kwinqanaba lesoftware kwaye ngokokugqitywa kweprojekthi yokugqibela, kuya kufuneka ube nguwe oza kuphumeza isisombululo, kancinci, nangakumbi.
Umbono uqala ekudaleni ifayile ye- Umguquleli walo naluphi na uhlobo lwefonti, amagama okanye ibinzana lekhowudi ye-morse. Oku kulula njengokusebenzisa ibhodi yeArduino eya kuba yiyo eneesoftware eziyimfuneko ezilayishiwe ukuze, ngokuphuma kwayo, senze ii-LEDs ezimbalwa zibukeke ngokwentsingiselo yolwimi lweMorse esiyibonakalisayo. Ukubhala ngokulula isicatshulwa esifuna ukusiguqulela, siya kusebenzisa iselfowuni enezixhobo zokusebenza ze-Android eziza kuthumela isicatshulwa ngonxibelelwano lweBluetooth kwibhodi yethu. Arduino UNO.
Izinto eziyimfuneko ukwenza iprojekthi
Njengoko sizame kancinci okanye kancinci ukubonisa kwimigca ephezulu, ukwenza le projekthi siyakufuna izinto ezithile nangona, ukuba uyalithanda ilizwe umenzi, Ndiqinisekile ukuba ayizukuba nzima kuwe ukufumana into oyiphosayo nakweziphi iivenkile zakho ezihamba rhoqo xa ungenayo nangona, njengoko ndisitsho, zihlala Izinto ezisetyenziswa rhoqo. Ngokukodwa, kuya kufuneka sibe nolu luhlu lulandelayo:
- Ardunio OMNYE
- Ibhodi yesonka
- I-Bluetooth yeArduino
- Izibane ezine ze-LED, ezi-3 ngombala ofanayo kunye nokukhanya kwesine kombala owahlukileyo
- Iintambo ezininzi zokwenza lula unxibelelwano phakathi kwezixhobo, kule meko ukunxibelelana nebhodi yesonka kunye nomlawuli wethu weArduino
- Intambo yokudibanisa iArdunio kwigalelo le-USB ukuze ukhuphele isoftware
- Uthetha uphondo
- Ikhompyuter ene-Arduino IDE efakwe ngokuchanekileyo kwaye Unxibelelwano lwe-USB ukuqhagamshela ibhodi
- Isixhobo esiphathwayo esisebenza ngenkqubo yokusebenza I-Android 2.2.1 okanye ngaphezulu
Nje ukuba sibe nazo zonke izinto eziyimfuneko ezikhoyo, sinokuqhubeka nokwenziwa kweprojekthi. Inqaku elinye lokugcina engqondweni leloqobo Akukho mfuneko yokuba usebenzise iadaptha yeBluetooth kule projekthi okanye kwikhadi Arduino UNO Njengokuba kungasetyenziswa nayiphi na enye enonxibelelwano olusisiseko, kuya kufuneka sinike ingqalelo kunxibelelwano olusetyenzisiweyo ukuze, umzekelo, kwimeko apho imveliso yedijithali ye-13 yethu Arduino UNO oku kuyahambelana nesiphumo esinye sebhodi oyisebenzisayo.
Amanyathelo okuphumeza iprojekthi
Ukwenza le projekthi, ngezantsi, ndiza kubonisa uthotho lwamanyathelo ahambelana nendibano kunye nonxibelelwano lwazo zonke izinto ezenza uluhlu lwangaphambili ekufuneka silulandele ekuphumezeni kwabo ngokuchanekileyo. Njengoko kuhlala kunjalo kolu hlobo lweprojekthi, zive ukhululekile ukuba lungisa nawuphi na umgca wekhowudi okanye ungeze izixhobo zekhompyutha ukuze uguquke kwaye ugqibelele ukusebenza kwawo kuba naluphi na uhlobo lokuphucula luhlala lusamkelekile.
Kwindawo yokuqala siza kuyenza uqhagamshelo lwe Arduino UNO nebhodi yethu yesonka. Ngokukodwa, iziphumo ezisetyenzisiweyo ziya kuba yi-GND kunye ne-3.3 V. Le migca inye iya kusinceda, phakathi kwezinye izinto, ukubonelela ngamandla kwiadaptha yethu yeBluetooth.
Nje ukuba senze olu nxibelelwano, lixesha lokulungelelanisa ukufakwa kwedatha kunye nokuphuma kweadaptha yeBluetooth kunye nokufakwa kwedatha yedijithali kunye neziphumo zebhodi yeArduino. Ngale ndlela siya kuba neadaptha yethu edityaniswe ngokugqibeleleyo kwikhadi zombini ukuze ifumane okwangoku kwaye ifumaneke ngokupheleleyo kwinqanaba lobugcisa ukuze ikwazi ukuqala 'phu laphule'idatha efikelela kumazibuko okungena kwe Arduino UNO. Njengeenkcukacha, ndikuxelele ukuba ngamanye amaxesha, ngenxa yamakhadi esiwasebenzisayo kunye neadaptha yeBluetooth, unxibelelwano olusetyenzisiweyo lunokwahluka, okwangoku, eyona nto intle yile jonga amaxwebhu okufaka iadaptha njengoko zihlala zihamba nemizobo yonxibelelwano.
Sifika ngo Unxibelelwano lwephondo lwe3 volt. Kule nto siza kusebenzisa ukuphuma kwenombolo ye-13 Arduino UNO. Unxibelelwano oluseleyo, njengesiqhelo, kufuneka siludibanise ne-GND okanye umhlaba ukuze ukusebenza kophondo kuchaneke.
Ngoku lixesha qhagamshela ii-LED ezahlukeneyo. Ukuze ungazami ukudideka, xelela ukuba umbono kukudibanisa owona mlenze mde, oqinisekileyo, kwesinye seziphumo zedijithali ze Arduino UNO ngelixa elifutshane liqhagamshela ngqo kwi-GND okanye emhlabeni. Ngale ndlela singafumanisa ukuba ii-LED zokuqala eziluhlaza ziya kuqhagamshelwa kwimveliso yedijithali eyi-12, elandelayo kuphume i-8, i-LED yesithathu eluhlaza ukukhupha i-7 ngelixa i-LED kuphela eluhlaza izakuqhagamshelwa kwimveliso yedijithali 4.
Inyathelo lokugqibela, xa sele yonke intambo ilungile Sebenzisa intambo yoqhagamshelo lwe-USB ukudibanisa yethu Arduino UNO kwikhompyuter kwaye ke sikwazi ukuyixhobisa ngesoftware eyimfuneko, esiya kuyibhala siyibhale ukusuka kwi-Arduino IDE uqobo.
Unxibelelwano phakathi kwebhodi yeArduino kunye nekhompyuter
Inqaku elinye ekufuneka lithathelwe ingqalelo xa ibhodi iqhagamshelwe kwikhompyuter ukuze sazi ukuba yonke into isebenza ngokuchanekileyo, ubuncinci ngokomgaqo, kukuba ibhodi iya kuba ukukhanya okuluhlaza kumaxesha onke ukuba ihlala ixhumene nekhompyuter. Kwelinye icala kwaye kuxhomekeke kwiadaptha yeBluetooth esiyisebenzisayo, le ihlala inesibane esibomvu esidanyazayo ngenxa yoqhagamshelo olungasetyenziswanga ngesixhobo se-Android esiya kuthi siyisebenzise ukuthumela iileta, amabinzana okanye amagama kwipleyiti.
Ndiyazi ukuba le nkcukacha ingentla inokubonakala ngathi yinto entle kakhulu 'tontoKodwa ndiyakuqinisekisa ukuba zisemthethweni, ziyimfuneko kwaye zibonisa umdla ngakumbi ukuba sithathela ingqalelo ukuba ngaphakathi kwabahlali abantu abaqala kwaye, enkosi kwaba bancinci 'amaqhinga'banokuqonda ukuba, ubuncinci, okwangoku kufikelela zombini iadaptha kunye nebhodi uqobo.
Okwangoku kufuneka sikhuphele usetyenziso UMSEBENZI.apk iqhotyoshelwe. Esi sicelo kufuneka sifakelwe kwisixhobo sakho esiphathwayo esixhotyiswe indlela yokusebenza ye-Android. Nje ukuba ifakwe, kufuneka uvule usetyenziso kwaye ucinezele uqhubeke. Ngeli xesha ukhetho esinomdla kakhulu kulo 'Thumela umbhalo', efanayo apho kufuneka ucofe ukufikelela kuyo. Nje ukuba sibe ngaphakathi kufuneka sicofe 'Xhuma' ukuseka unxibelelwano kunye neplate yethu.
Inkqubo yokufaka iikhowudi elandelwayo imi ngolu hlobo lulandelayo.
- Nje ukuba ungene kwisicelo sakho kwisixhobo se-Android kwaye ulandele amanyathelo angaphambili, uya kuba nakho ukubhala ileta, igama okanye ibinzana. Nje ukuba ubhale into oyifunayo, kuya kufuneka ucofe ekuthumeleni.
- Ukuba isicatshulwa sifunyenwe ngokuchanekileyo, inkqubo izakuvula izibane ngokuzenzekelayo ikhuphe nesandi
- Umbono kukuba ukukhanya kokuqala okuluhlaza kuya kuqhubeka kwaye kucime ukumisela 'inqaku'. Kwelinye icala, ixilongo liza kuvakala lize licime ngaxeshanye.
- Izibane zesibini nezesithathu eziluhlaza ziya kuvula zicime ukumisela 'umgca' ngokulandelelana. Uphondo, njengakwimeko engaphambili, luya kuvula lucime ngaxeshanye.
- Ekugqibeleni ukukhanya kwesine, oko kukuthi, ukukhanya okuluhlaza okwesibhakabhaka, kuya kuvula kwaye kucime ukumisela ukuphela komlinganiswa, igama okanye ibinzana. Xa kukho uhlobo lwesithuba phakathi komlinganiswa ngamnye, igama okanye ibinzana, oku kukhanya kuya kuvula kwaye kucime kabini.
Njengamanqaku ekufuneka ethathelwe ingqalelo, yitsho nje ukuba kule meko isicelo se-Android senziwe enkosi kwi-App Inventor, indlela elula yokuvelisa ikhowudi kunye noyilo lwesicelo esiya kuthi kamva siqhutywe kwisixhobo esinezixhobo zokusebenza Inkqubo eyenziwe ziinjineli zikaGoogle.
Olunye ulwazi kunye neenkcukacha: ezinokufundiseka