Kulesi sihloko, ngizokutshela indaba yekhamera yami yakamuva: ikhamera yedijithali ye-Polaroid, ehlanganisa iphrinta yamarisidi ne-Raspberry Pi.Ukuyakha, ngathatha ikhamera ye-Polaroid Minute Maker endala, ngasusa amathumbu, ngasebenzisa ikhamera yedijithali, isibonisi se-E-ink, iphrinta yamarisidi nesilawuli se-SNES ukuze ngisebenzise ikhamera esikhundleni sezitho zangaphakathi.Ungakhohlwa ukungilandela ku-Instagram (@ade3).
Iphepha elivela kukhamera elinesithombe liwumlingo kancane.Ikhiqiza umphumela othokozisayo, futhi ividiyo esesikrinini sekhamera yesimanje yedijithali ikuphakela leyo njabulo.Amakhamera amadala e-Polaroid ahlala engidabukisa kancane ngoba ayimishini eklanywe kahle kakhulu, kodwa lapho ifilimu iyekwa, aba imisebenzi yobuciko efiselekayo, eqoqa uthuli emashalofini ethu ezincwadi.Kuthiwani uma ungasebenzisa iphrinta yamarisidi esikhundleni sefilimu esheshayo ukuze ulethe impilo entsha kulawa makhamera amadala?
Uma kulula kimi ukuwenza, lesi sihloko sizocubungula imininingwane yobuchwepheshe yokuthi ngenza kanjani ikhamera.Ngenza lokhu ngoba ngethemba ukuthi ukuhlolwa kwami kuzogqugquzela abanye abantu ukuthi bazame iphrojekthi bebodwa.Lokhu akukona ukuguqulwa okulula.Eqinisweni, lokhu kungase kube ukuqhekeka kwekhamera okunzima kakhulu engake ngakuzama, kodwa uma unquma ukuxazulula le phrojekthi, ngizozama ukuhlinzeka ngemininingwane eyanele kusukela kokuhlangenwe nakho kwami ukukuvimbela ukuthi ungabambeki.
Kungani kufanele ngenze lokhu?Ngemuva kokuthatha isithombe ngekhamera yami ye-coffee blender, ngifuna ukuzama izindlela ezimbalwa ezihlukile.Uma ngibheka uchungechunge lwekhamera yami, ikhamera ye-Polaroid Minute Maker ivele yaphuma kimi futhi yaba inketho efanelekile yokuguqulwa kwedijithali.Lena iphrojekthi engifanele kakhulu ngoba ihlanganisa ezinye zezinto esengivele ngidlala ngazo: I-Raspberry Pi, isibonisi se-E Ink nephrinta yamarisidi.Zihlanganise, uzotholani?Lena indaba yokuthi ikhamera yami yedijithali ye-Polaroid yenziwa kanjani...
Ngike ngabona abantu bezama amaphrojekthi afanayo, kodwa akekho owenze umsebenzi omuhle echaza ukuthi awenza kanjani.Ngethemba ukuthi ngizoligwema leli phutha.Inselele yalo msebenzi ukwenza zonke izingxenye ezihlukahlukene zisebenze ndawonye.Ngaphambi kokuthi uqale ukusunduza zonke izingxenye kucala le-Polaroid, ngincoma ukuthi usakaze yonke into ngenkathi uhlola futhi usetha zonke izingxenye ezahlukahlukene.Lokhu kukuvimbela ekuhlanganiseni futhi nasekuhlakazeni ikhamera njalo uma ushayisa isithiyo.Ngezansi, ungabona zonke izingxenye ezixhunyiwe nezisebenzayo ngaphambi kokuthi yonke into igxishwe kukesi le-Polaroid.
Ngenze amavidiyo athile ukuze ngiqophe ukuqhubeka kwami.Uma uhlela ukuxazulula le phrojekthi, kufanele uqale ngale vidiyo yemizuzu engu-32 ngoba ungabona ukuthi yonke into ihlangana kanjani futhi uqonde izinselele okungenzeka uhlangabezane nazo.
Nazi izingxenye namathuluzi engiwasebenzisile.Lapho konke sekushiwo, izindleko zingase zidlule u-$200.Izindleko ezinkulu kuzoba iRaspberry Pi (amadola aseMelika angama-35 kuye kwangama-75), amaphrinta (amadola angama-50 kuye kwangama-62), amamonitha (amadola angama-37 aseMelika) namakhamera (amadola angama-25 aseMelika).Ingxenye ethokozisayo ukwenza iphrojekthi ibe ngeyakho, ngakho izindleko zakho zizohluka kuye ngephrojekthi ofuna ukuyifaka noma ukukhipha, ukuthuthukisa noma ukwehlisela phansi.Nansi ingxenye engiyisebenzisayo:
Ikhamera engiyisebenzisayo iyikhamera yomzuzu we-Polaroid.Uma bengingakwenza futhi, bengizosebenzisa umshini wokushwiba we-Polaroid ngoba ngokuyisisekelo uwumklamo ofanayo, kodwa iphaneli yangaphambili yinhle kakhulu.Ngokungafani namakhamera amasha e-Polaroid, lawa mamodeli anendawo eyengeziwe ngaphakathi, futhi anomnyango ngemuva okuvumela ukuthi uvule futhi uvale ikhamera, evumelana kakhulu nezidingo zethu.Yenza ukuzingela futhi kufanele ukwazi ukuthola enye yalawa makhamera e-Polaroid ezitolo zasendulo noma ku-eBay.Ungase ukwazi ukuthenga eyodwa ngemali engaphansi kuka-$20.Ngezansi, ungabona iSwinger (kwesokunxele) kanye noMenzi Wamaminithi (kwesokudla).
Ngokombono, ungasebenzisa noma iyiphi ikhamera ye-Polaroid kulolu hlobo lwephrojekthi.Ngiphinde nginamakhamera angemuva anezivunguvungu futhi agoqiwe, kodwa inzuzo ye-Swinger noma iMinute Maker ukuthi enziwe ngepulasitiki eqinile futhi ayinazo izingxenye eziningi ezihambayo ngaphandle komnyango ongemuva.Isinyathelo sokuqala ukukhumula wonke amathumbu ekhamera ukuze kuvuleke indawo yonke imikhiqizo yethu ye-elekthronikhi.Konke kufanele kwenziwe.Ekugcineni, uzobona inqwaba kadoti, njengoba kukhonjisiwe ngezansi:
Izingxenye eziningi zekhamera zingasuswa ngodlawu nangamandla anonya.Lezi zinto azihlukaniswanga, ngakho-ke uzozabalaza ne-glue kwezinye izindawo.Ukususa ingaphambili le-Polaroid kunzima kakhulu kunokubukeka.Kukhona izikulufu ngaphakathi futhi amathuluzi athile ayadingeka.Ngokusobala yi-Polaroid kuphela enabo.Ungase ukwazi ukuwaqaqa ngodlawu, kodwa ngancama ngawaphoqa ukuba avale.Uma ngibheka emuva, ngidinga ukunaka kakhulu lapha, kodwa umonakalo engiwudalile ungalungiswa nge-super glue.
Uma usuphumelele, uzophinda ulwe nezingxenye okungafanele zihlukaniswe.Ngokufanayo, udladla kanye namandla anonya ayadingeka.Qaphela ukuthi ungalimazi noma yini ebonakalayo ngaphandle.
Ilensi ingenye yezinto ezikhohlisayo okufanele zisuswe.Ngaphandle kokubhoboza imbobo engilazini/epulasitiki bese ngiyikhipha, angizange ngicabange ngezinye izixazululo ezilula.Ngifuna ukulondoloza ukubukeka kwelensi ngangokunokwenzeka ukuze abantu bangakwazi ngisho nokubona ikhamera encane ye-Raspberry Pi maphakathi nendandatho emnyama lapho ilensi yayilungiswe khona ngaphambili.
Kuvidiyo yami, ngibonise ukuqhathanisa ngaphambi nangemuva kwezithombe ze-Polaroid, ukuze ubone kahle ukuthi yini ofuna ukuyisusa kukhamera.Qaphela ukuqinisekisa ukuthi iphaneli yangaphambili ingavulwa futhi ivalwe kalula.Cabanga ngephaneli njengomhlobiso.Ezimweni eziningi, izolungiswa endaweni, kodwa uma ufuna ukuxhuma i-Raspberry Pi kusiqapha kanye nekhibhodi, ungasusa iphaneli yangaphambili bese uxhuma umthombo wamandla.Ungaphakamisa isixazululo sakho lapha, kodwa nginqume ukusebenzisa omazibuthe njengendlela yokubamba iphaneli endaweni.I-Velcro ibonakala intekenteke kakhulu.Izikulufu ziningi kakhulu.Lesi isithombe esigqwayizayo esibonisa ikhamera ivula futhi ivala iphaneli:
Ngikhethe i-Raspberry Pi 4 Model B ephelele esikhundleni se-Pi Zero encane.Lokhu ngokwengxenye ukukhulisa isivinini futhi ngokwengxenye ngoba ngimusha ensimini ye-Raspberry Pi, ngakho-ke ngizizwa ngikhululekile ukuyisebenzisa.Ngokusobala, i-Pi Zero encane izodlala ezinye izinzuzo endaweni encane ye-Polaroid.Isingeniso se-Raspberry Pi singaphezu kwalesi sifundo, kodwa uma umusha ku-Raspberry Pi, kunezinsiza eziningi ezitholakalayo lapha.
Isincomo esijwayelekile ukuthatha isikhathi futhi ubekezele.Uma uvela ngemuva kwe-Mac noma ye-PC, uzodinga isikhathi esithile ukuze uzijwayeze ngama-nuances we-Pi.Udinga ukujwayela umugqa womyalo futhi ufunde amakhono athile wokubhala amakhodi wePython.Uma lokhu kukwenza uzizwe usaba (ngangesaba ekuqaleni!), ngicela ungathukutheli.Uma nje ukwamukela ngokuphikelela nangesineke, uzokuthola.Ukusesha nge-inthanethi nokubekezela kunganqoba cishe zonke izithiyo ohlangabezana nazo.
Isithombe esingenhla sibonisa lapho i-Raspberry Pi ibekwe khona kukhamera ye-Polaroid.Ungabona indawo yokuxhumana yesiphakeli samandla kwesokunxele.Futhi qaphela ukuthi umugqa ohlukanisayo ompunga udlulela ngobubanzi bokuvulwa.Ngokuyisisekelo, lokhu ukwenza iphrinta incike kuyo futhi ihlukanise i-Pi nephrinta.Lapho uxhuma iphrinta, udinga ukuqaphela ukuthi ungaphuli iphinikhodi ekhonjwe ipensela esithombeni.Ikhebula lokubonisa lixhuma kumaphini lapha, futhi isiphetho sentambo esiza nesibonisi singaba yikota ye-intshi ubude.Kwadingeka nginwebe iziphetho zezintambo kancane ukuze iphrinta ingazicindezeli.
I-Raspberry Pi kufanele ibekwe ukuze uhlangothi olunembobo ye-USB lukhombe ngaphambili.Lokhu kuvumela isilawuli se-USB ukuthi sixhunywe ngaphambili kusetshenziswa i-adaptha emise okwe-L.Nakuba lokhu kwakungeyona ingxenye yohlelo lwami lwangempela, ngisasebenzisa intambo encane ye-HDMI ngaphambili.Lokhu kungivumela ukuthi ngikhiphe iphaneli kalula bese ngixhuma imonitha nekhibhodi ku-Pi.
Ikhamera iyimojuli ye-Raspberry Pi V2.Ikhwalithi ayiyinhle njengekhamera entsha ye-HQ, kodwa asinaso isikhala esanele.Ikhamera ixhunywe ku-Raspberry Pi ngeribhoni.Sika imbobo encane ngaphansi kwelensi lapho iribhoni ingadlula khona.Iribhoni idinga ukusonteka ngaphakathi ngaphambi kokuxhuma ku-Raspberry Pi.
Iphaneli yangaphambili ye-Polaroid inobuso obuyisicaba, obufanele ukukhwezwa kwekhamera.Ukuyifaka, ngisebenzise itheyiphu enamacala amabili.Kufanele uqaphele ngemuva ngoba kunezingxenye ze-elekthronikhi ebhodini lekhamera ongafuni ukuzilimaza.Ngisebenzise ezinye izingcezu zetheyiphu njengama-spacers ukuvimbela lezi zingxenye ukuthi zingaphihli.
Kunamaphuzu amabili ngaphezulu okufanele uwaqaphele esithombeni esingenhla, ungabona ukuthi ungafinyelela kanjani izimbobo ze-USB ne-HDMI.Ngisebenzise i-adaptha ye-USB emise okwe-L ukuze ngikhombe uxhumano kwesokudla.Ngekhebula le-HDMI ekhoneni eliphezulu kwesokunxele, ngisebenzise ikhebula lokunweba elingu-6 intshi ngesixhumi esimise okwe-L ngakolunye uhlangothi.Lokhu ungakubona kangcono kuvidiyo yami.
I-E Ink ibonakala iyisinqumo esihle semonitha ngoba isithombe sifana kakhulu nesithombe esiphrintwe ephepheni lokuthola.Ngisebenzise i-Waveshare 4.2-inch electronic inki module enamaphikseli angu-400×300.
Uyinki kagesi unekhwalithi ye-analog engisanda kuyithanda.Kubukeka njengephepha.Kuyanelisa ngempela ukubonisa izithombe esikrinini ngaphandle kwamandla.Ngoba akukho ukukhanya kokunika amandla amaphikseli, uma isithombe sesidaliwe, sihlala esikrinini.Lokhu kusho ukuthi noma amandla angekho, isithombe sihlala ngemuva kwe-Polaroid, okungikhumbuza ukuthi isithombe sokugcina engisithathile sasiyini.Uma ngikhuluma iqiniso, isikhathi sokuba ikhamera ibekwe eshalofini lami lezincwadi side kakhulu kunalapho isetshenziswa, inqobo nje uma ikhamera ingasetshenzisiwe, ikhamera izocishe ibe uhlaka lwesithombe, okuyisinqumo esihle.Ukonga amandla akubalulekile.Ngokuphambene nezibonisi ezisekelwe ekukhanyeni ezihlala zisebenzisa amandla, i-E Ink idla kuphela amandla lapho idinga ukudwetshwa kabusha.
Izibonisi zikayinki zikagesi nazo zinezinkinga.Into enkulu ijubane.Uma kuqhathaniswa nezibonisi ezisekelwe ekukhanyeni, kuthatha isikhathi eside kuphela ukuvula noma ukuvala iphikseli ngayinye.Okunye okungalungile ukuvuselela isikrini.Imonitha ye-E Ink ebiza kakhulu ingavuselelwa kancane, kodwa imodeli eshibhile izodweba kabusha sonke isikrini njalo uma kwenzeka noma yiziphi izinguquko.Umphumela uba ukuthi isikrini siba mnyama futhi sibe mhlophe, bese isithombe sivele sibheke phansi ngaphambi kokuthi kuvele isithombe esisha.Kuthatha isekhondi elilodwa kuphela ukucwayiza, kodwa hlanganisa.Sekukonke, kuthatha cishe imizuzwana emi-3 ukuthi lesi sikrini sibuyekezwe kusukela ngesikhathi inkinobho icindezelwa ngayo kuze kufike lapho kuvela isithombe esikrinini.
Enye into okufanele uyikhumbule ukuthi, ngokungafani nezibonisi zekhompyutha ezibonisa amadeskithophu namagundane, udinga ukuhluka ngezibonisi ze-e-ink.Ngokuyisisekelo, utshela umqaphi ukuthi abonise okuqukethwe ngephikseli eyodwa ngesikhathi.Ngamanye amazwi, lokhu akuyona ipulaki nokudlala, udinga ikhodi ethile ukuze uzuze lokhu.Njalo uma isithombe sithathwa, umsebenzi wokudweba isithombe kumonitha uyakhishwa.
I-Waveshare inikeza abashayeli ngezibonisi zayo, kodwa imibhalo yayo mabi.Hlela ukuchitha isikhathi esithile ulwa nemonitha ngaphambi kokuthi isebenze kahle.Lawa amadokhumenti esikrini engisisebenzisayo.
Isibonisi sinezintambo ezingu-8, futhi uzoxhuma lezi zintambo kumaphini we-Raspberry Pi.Ngokuvamile, ungasebenzisa kuphela intambo eza nomqapha, kodwa njengoba sisebenza endaweni encane, kufanele nginwebe ukuphela kwentambo hhayi phezulu kakhulu.Lokhu konga cishe ingxenye yesine yeyintshi yesikhala.Ngicabanga ukuthi esinye isisombululo ukusika ipulasitiki eyengeziwe ephrinta yamarisidi.
Ukuze uxhume isibonisi ngemuva kwe-Polaroid, uzobhoboza izimbobo ezine.Imonitha inezimbobo zokukhwezwa emakhoneni.Beka isibonisi endaweni oyifunayo, qiniseka ukuthi ushiya isikhala ngezansi ukuze uveze iphepha lokulithola, bese umaka bese ubhoboza izimbobo ezine.Bese uqinisa isikrini ngemuva.Kuzoba negebe elingu-1/4 intshi phakathi kwengemuva le-Polaroid nengemuva lemonitha.
Ungase ucabange ukuthi isibonisi sikayinki we-elekthronikhi sinzima kakhulu kunalokho esikufanele.Kungenzeka ukuthi uqinisile.Uma ufuna inketho elula, kungase kudingeke ubheke imonitha encane yombala engaxhunywa ngembobo ye-HDMI.Ububi ukuthi uzohlala ubheka ideskithophu yesistimu yokusebenza ye-Raspberry Pi, kodwa inzuzo ukuthi ungakwazi ukuyixhuma futhi uyisebenzise.
Ungase udinge ukubuyekeza ukuthi iphrinta yamarisidi isebenza kanjani.Abawusebenzisi uyinki.Kunalokho, la maphrinta asebenzisa iphepha elishisayo.Angiqiniseki ngokuphelele ukuthi leli phepha ladalwa kanjani, kodwa ungacabanga ngalo njengomdwebo oshisayo.Lapho ukushisa kufinyelela ku-270 degrees Fahrenheit, izindawo ezimnyama ziyakhiqizwa.Uma umqulu wephepha uzoshisa ngokwanele, uzoba mnyama ngokuphelele.Inzuzo enkulu lapha ukuthi asikho isidingo sokusebenzisa uyinki, futhi uma kuqhathaniswa nefilimu yangempela ye-Polaroid, akukho ukusabela kwamakhemikhali okuyinkimbinkimbi okudingekayo.
Kukhona nebubi bokusebenzisa iphepha elishisayo.Ngokusobala, ungasebenza kuphela kumnyama nomhlophe, ngaphandle kombala.Ngisho nasebangeni elimnyama nelimhlophe, awekho ama-shades of grey.Kufanele udwebe isithombe ngokuphelele ngamachashazi amnyama.Uma uzama ukuthola ikhwalithi eningi ngangokunokwenzeka kulawa maphuzu, nakanjani uzowela enkingeni yokuqonda i-jitter.Ukunaka okukhethekile kufanele kukhokhwe ku-algorithm ye-Floyd-Steinberg.Ngizokuvumela ukuthi uhambe wedwa kulowo mbila.
Uma uzama ukusebenzisa izilungiselelo ezihlukile zokuqhathanisa nezindlela zokuphambanisa, nakanjani uzohlangabezana nezithombe ezinde zezithombe.Lokhu kuyingxenye yezithombe ozishuthe zona eziningi engizicijile ekukhishweni kwesithombe esifanele.
Ngokwami, ngithanda ukubukeka kwezithombe ezingcolile.Lapho besifundisa ukudweba ngokusebenzisa i-stippling, kwangikhumbuza ikilasi lami lokuqala lobuciko.Ukubukeka okuyingqayizivele, kodwa kuhlukile ekuhleleni kahle izithombe ezimnyama nezimhlophe esiqeqeshelwe ukukwazisa.Lokhu ngikusho ngoba le khamera ichezuka esikweni futhi izithombe eziyingqayizivele ezikhiqizayo kufanele zithathwe “njengomsebenzi” wekhamera, hhayi “isiphazamisi”.Uma sifuna isithombe sangempela, singasebenzisa noma iyiphi enye ikhamera yomthengi emakethe futhi songe imali ethile ngesikhathi esifanayo.Iphuzu lapha ukwenza okuthile okuyingqayizivele.
Manje njengoba usuqonda ukuphrinta okushisayo, ake sikhulume ngamaphrinta.Iphrinta yamarisidi engiyisebenzisile yathengwa kwa-Adafruit.Ngithenge i-“Mini Thermal Receipt Printer Starter Pack” yabo, kodwa ungayithenga ngokwehlukana uma kudingeka.Ngokombono, awudingi ukuthenga ibhethri, kodwa ungase udinge i-adaptha yamandla ukuze ukwazi ukuyixhuma odongeni ngesikhathi sokuhlola.Okunye okuhle ukuthi i-Adafruit inezifundo ezinhle ezizokunikeza ukuzethemba ukuthi konke kuzohamba ngokujwayelekile.Qala kulokhu.
Ngethemba ukuthi iphrinta ingalingana ne-Polaroid ngaphandle kwezinguquko.Kodwa inkulu kakhulu, ngakho-ke kuzodingeka unciphise ikhamera noma usike iphrinta.Ngikhethe ukucwenga kabusha iphrinta ngoba ingxenye yesikhalo sephrojekthi bekuwukugcina ukubukeka kwe-Polaroid ngangokunokwenzeka.I-Adafruit iphinde ithengise amaphrinta amarisidi ngaphandle kwekesi.Lokhu konga indawo namadola ambalwa, futhi manje njengoba sengiyazi ukuthi yonke into isebenza kanjani, ngingase ngisebenzise lokho ngokuzayo lapho ngakha into efana nale.Kodwa-ke, lokhu kuzoletha inselele entsha, okungukuthi indlela yokunquma ukuthi ibamba kanjani iphepha.Imiklamo efana nalena imayelana nokuvumelana nezinselelo zokukhetha ukuzixazulula.Ungabona ngezansi kwesithombe i-engeli edinga ukusikwa ukuze kwenziwe iphrinta ilingane.Lokhu kusikeka kuzodinga futhi ukuthi kwenzeke ngakwesokudla.Uma usika, sicela uqaphele ukuthi ugwema izintambo zephrinta nezinto zokusebenza zangaphakathi zikagesi.
Inkinga eyodwa ngamaphrinta e-Adafruit ukuthi ikhwalithi iyahlukahluka kuye ngomthombo wamandla.Batusa ukusebenzisa ugesi ongu-5v.Isebenza ngempumelelo, ikakhulukazi ekuphrinteni okusekelwe ematheksthini.Inkinga ukuthi uma uphrinta isithombe, izindawo ezimnyama zivame ukugqama.Amandla adingekayo ukushisisa bonke ububanzi bephepha makhulu kakhulu kunalapho kunyatheliswa umbhalo, ngakho izindawo ezimnyama zingase zibe mpunga.Kunzima ukukhononda, lawa maphrinta awaklanyelwe ukuphrinta izithombe phela.Iphrinta ayikwazi ukukhiqiza ukushisa okwanele kulo lonke ububanzi bephepha ngesikhathi.Ngizamile ezinye izintambo zikagesi ezinemiphumela ehlukene, kodwa angibanga nempumelelo enkulu.Ekugcineni, kunoma yikuphi, ngidinga ukusebenzisa amabhethri ukuze ngiwunike amandla, ngakho ngiyekile ukuhlola intambo yamandla.Ngokungalindelekile, ibhethri elishajekayo le-7.4V 850mAh Li-PO engalikhetha lenze umphumela wokuphrinta wayo yonke imithombo yamandla engiyihlole ngokumnyama kakhulu.
Ngemva kokufaka iphrinta kukhamera, sika imbobo ngaphansi kwemonitha ukuze uqondanise nephepha eliphuma kuphrinta.Ukusika iphepha lamarisidi, ngasebenzisa inkeba yesisiki seteyipu esidala sokupakisha.
Ngokungeziwe ekukhishweni okumnyama kwamabala, okunye okungalungile ukuhlanganisa.Noma kunini lapho iphrinta ima isikhashana ukuze ibambe idatha ephakelwayo, izoshiya igebe elincane uma iqala ukuphrinta futhi.Ngokombono, uma ungakwazi ukususa isigcinalwazi futhi uvumele ukusakaza kwedatha kuqhubeke kuphrinta, ungagwema lesi sikhala.Ngempela, lokhu kubonakala kuyinketho.Iwebhusayithi ye-Adafruit ikhuluma ngama-pushpin angabhaliwe kuphrinta, angasetshenziswa ukugcina izinto zivumelanisiwe.Angikakuhloli lokhu ngoba angazi ukuthi kusebenza kanjani.Uma uxazulula le nkinga, ngicela wabelane nami ngempumelelo yakho.Leli elinye iqoqo lezithombe ozishuthe zona lapho ungabona khona amabhendi ngokucacile.
Kuthatha amasekhondi angu-30 ukuphrinta isithombe.Le yividiyo yephrinta esebenzayo, ukuze uzwe ukuthi kuthatha isikhathi esingakanani ukuphrinta isithombe.Ngikholwa ukuthi lesi simo singase senyuke uma kusetshenziswa ama-hacks e-Adafruit.Ngisola ukuthi isikhawu sesikhathi phakathi kokuphrinta sibambezeleke ngokuzenzakalelayo, okuvimbela iphrinta ukuthi yeqe isivinini sedatha yedatha.Ngikusho lokhu ngoba ngifunde ukuthi i-advanced paper kumele ivunyelaniswe nekhanda lephrinta.Ngingahle ngibe nephutha.
Njengesibonisi se-E-ink, kuthatha isineke ukwenza iphrinta isebenze.Ngaphandle komshayeli wokuphrinta, empeleni usebenzisa ikhodi ukuthumela idatha ngokuqondile kuphrinta.Ngokufanayo, insiza engcono kakhulu ingaba iwebhusayithi ye-Adafruit.Ikhodi esendaweni yami ye-GitHub iguqulelwe ezibonelweni zabo, ngakho-ke uma uhlangabezana nobunzima, imibhalo ye-Adafruit kuzoba ukukhetha kwakho okuhle kakhulu.
Ngaphezu kwezinzuzo ze-nostalgic neze-retro, inzuzo yesilawuli se-SNES ukuthi singinikeza ezinye izilawuli okungafanele ngicabange ngazo kakhulu.Ngidinga ukugxila ekutholeni ikhamera, iphrinta, nokuqapha ukuze kusebenze ndawonye, futhi ngibe nesilawuli esivele sikhona esingafaka imephu ngokushesha imisebenzi yami ukuze ngenze izinto zibe lula.Ngaphezu kwalokho, sengivele nginolwazi lokusebenzisa isilawuli sami se-Coffee Stirrer Camera, ukuze ngikwazi ukuqalisa kalula.
Isilawuli esibuyela emuva sixhunywe ngentambo ye-USB.Ukuze uthathe isithombe, cindezela inkinobho A.Ukuphrinta isithombe, cindezela inkinobho ethi B.Ukuze ususe isithombe, cindezela inkinobho X.Ukusula isibonisi, ngingacindezela inkinobho ethi Y.Angizange ngisebenzise izinkinobho zokuqala/zokukhetha noma izinkinobho kwesokunxele/kwesokudla phezulu, ngakho-ke uma nginemibono emisha ngokuzayo, isengasetshenziselwa izici ezintsha.
Ngokuqondene nezinkinobho zemicibisholo, izinkinobho zekhiphedi ezingakwesokunxele nezingakwesokudla zizozungeza kuzo zonke izithombe engizithathile.Ukucindezela phezulu akuwenzi umsebenzi okwamanje.Ukucindezela kuzothuthukisa iphepha lephrinta yerisidi.Lokhu kulula kakhulu ngemva kokuphrinta isithombe, ngifuna ukukhafula elinye iphepha ngaphambi kokulidabula.Ukwazi ukuthi iphrinta ne-Raspberry Pi ziyaxhumana, lokhu futhi kuwukuhlola okusheshayo.Ngacindezela, futhi lapho ngizwa ukuphakelwa kwephepha, ngabona ukuthi ibhethri lephrinta lalisashaja futhi selilungele ukusetshenziswa.
Ngisebenzise amabhethri amabili kukhamera.Enye inika amandla i-Raspberry Pi kanti enye inika amandla iphrinta.Ngokombono, nonke ningasebenza ngamandla afanayo, kodwa angicabangi ukuthi ninamandla anele okuqalisa iphrinta ngokugcwele.
Nge-Raspberry Pi, ngithenge ibhethri elincane kakhulu engingalithola.Ihlezi ngaphansi kwe-Polaroid, iningi lazo lifihliwe.Angilithandi iqiniso lokuthi intambo yamandla kumele isuke ngaphambili iye emgodini ngaphambi kokuxhuma ku-Raspberry Pi.Mhlawumbe ungathola indlela yokuminyanisa elinye ibhethri ku-Polaroid, kodwa asikho isikhala esiningi.Ububi bokufaka ibhethri ngaphakathi ukuthi kufanele uvule ikhava yangemuva ukuze uvule futhi uvale idivayisi.Vele ukhiphe ibhethri ukuze uvale ikhamera, okuyisinqumo esihle.
Ngisebenzise intambo ye-USB eneswishi yokuvula/yokuvala evela ku-CanaKit.Ngingahle ngibe muhle kakhulu kulo mbono.Ngicabanga ukuthi i-Raspberry Pi ingavulwa futhi icishwe ngale nkinobho nje.Eqinisweni, ukunqamula i-USB ebhethrini kulula ngendlela efanayo.
Ngephrinta, ngisebenzise ibhethri le-850mAh Li-PO eliphinde lishajwe.Ibhethri elifana naleli linezintambo ezimbili eziphuma kulo.Enye iwukukhiphayo kanti enye ishaja.Ukuze ngifinyelele "uxhumano olusheshayo" ekuphumeni, kwakudingeka ngishintshe isixhumi ngesixhumi esijwayelekile se-3-wire Connector.Lokhu kuyadingeka ngoba angifuni ukuthi ngikhiphe yonke iphrinta njalo uma ngidinga ukunqamula amandla.Kungaba ngcono ukushintsha lapha, futhi ngingase ngikuthuthukise ngokuzayo.Okungcono nakakhulu, uma iswishi ingaphandle kwekhamera, ngingakhipha iphrinta ngaphandle kokuvula umnyango ongemuva.
Ibhethri itholakala ngemuva kwephrinta, futhi ngikhiphe intambo ukuze ngikwazi ukuxhuma futhi nginqamule amandla njengoba kudingeka.Ukuze ushaje ibhethri, uxhumano lwe-USB luhlinzekwa ngebhethri.Ngikuchaze futhi lokhu kuvidiyo, ngakho-ke uma ufuna ukuqonda ukuthi kusebenza kanjani, sicela ukuhlole.Njengoba ngishilo, inzuzo emangalisayo ukuthi lesi silungiselelo sikhiqiza imiphumela engcono yokuphrinta uma iqhathaniswa nokuxhuma ngokuqondile odongeni.
Lapha yilapho ngidinga ukunikeza umshwana wokuzihlangula.Ngingabhala iPython ephumelelayo, kodwa angikwazi ukusho ukuthi yinhle.Yebo, kunezindlela ezingcono zokwenza lokhu, futhi abahleli bezinhlelo abangcono bangayithuthukisa kakhulu ikhodi yami.Kodwa njengoba ngishilo, kuyasebenza.Ngakho-ke, ngizokwabelana nawe ngenqolobane yami ye-GitHub, kodwa angikwazi ngempela ukukunikeza ukwesekwa.Ngethemba ukuthi lokhu kwanele ukukukhombisa engikwenzayo futhi ungakuthuthukisa.Yabelana nami ngokuthuthuka kwakho, ngizokujabulela ukubuyekeza ikhodi yami futhi ngikunikeze ikhredithi.
Ngakho-ke, kucatshangwa ukuthi usethe ikhamera, ukuqapha kanye nephrinta, futhi ungasebenza ngokujwayelekile.Manje usungakwazi ukusebenzisa umbhalo wami wePython obizwa ngokuthi “digital-polaroid-camera.py”.Ekugcineni, udinga ukusetha i-Raspberry Pi ukuthi iqalise ngokuzenzakalelayo lesi script ekuqaleni, kodwa okwamanje, ungasiqhuba usuka kumhleli wePython noma ukuphela.Okulandelayo kuzokwenzeka:
Ngizamile ukwengeza amazwana kukhodi ukuchaza ukuthi kwenzekeni, kodwa kukhona okwenzekile ngenkathi ngithatha isithombe futhi ngidinga ukuchaza kabanzi.Uma isithombe sithathwa, siwumbala ogcwele, isithombe esinosayizi ogcwele.Isithombe silondolozwe kufolda.Lokhu kulula ngoba uma udinga ukusisebenzisa kamuva, uzoba nesithombe esinokulungiswa okuphezulu esijwayelekile.Ngamanye amazwi, ikhamera isadala i-JPG evamile njengamanye amakhamera edijithali.
Uma isithombe sithathwa, kuzokwenziwa isithombe sesibili, esilungiselelwa ukubonisa nokuphrinta.Usebenzisa i-ImageMagick, ungashintsha usayizi wesithombe sokuqala futhi usiguqule sibe mnyama nokumhlophe, bese usebenzisa i-Floyd Steinberg dithering.Ngingakwazi futhi ukukhulisa ukugqama kulesi sinyathelo, nakuba lesi sici sicishwe ngokuzenzakalelayo.
Isithombe esisha silondolozwe kabili.Okokuqala, yilondoloze njenge-jpg emnyama nemhlophe ukuze ibukwe futhi isetshenziswe futhi kamuva.Ukulondoloza kwesibili kuzodala ifayela elinesandiso se-.py.Leli akulona ifayela lesithombe elijwayelekile, kodwa ikhodi ethatha lonke ulwazi lwephikseli esithombeni bese iyiguqulela kudatha engathunyelwa kuphrinta.Njengoba ngishilo esigabeni sokuphrinta, lesi sinyathelo siyadingeka ngoba akukho mshayeli wokuphrinta, ngakho awukwazi nje ukuthumela izithombe ezijwayelekile kuphrinta.
Uma inkinobho icindezelwa futhi isithombe siphrintwa, kukhona namakhodi ebhiphu.Lokhu kuyinketho, kodwa kuhle ukuthola impendulo ezwakalayo ukuze ukwazise ukuthi kukhona okwenzekayo.
Okokugcina, angikwazanga ukusekela le khodi, eyokukukhomba endleleni efanele.Sicela uyisebenzise, uyiguqule, uyithuthukise futhi uzenzele yona.
Lena iphrojekthi ethokozisayo.Uma ngibheka emuva, ngizokwenza okuthile okuhlukile noma mhlawumbe ngikubuyekeze esikhathini esizayo.Esokuqala isilawuli.Yize isilawuli se-SNES singenza khona kanye lokho engifuna ukukwenza, kuyisixazululo esixakile.Intambo ivinjiwe.Kukuphoqa ukuthi ubambe ikhamera ngesandla esisodwa nesilawuli kwesinye.Amahloni kakhulu.Isixazululo esisodwa kungaba ukucwenga izinkinobho kusilawuli bese uzixhuma ngqo kukhamera.Nokho, uma ngifuna ukuxazulula le nkinga, ngingahle ngilahle i-SNES ngokuphelele futhi ngisebenzise izinkinobho zendabuko ezengeziwe.
Okunye ukuphazamiseka kwekhamera ukuthi njalo uma ikhamera ivuliwe noma ivaliwe, ikhava yangemuva idinga ukuvulwa ukuze kunqanyulwe iphrinta ebhethrini.Kubonakala sengathi lokhu kuyinto encane, kodwa ngaso sonke isikhathi lapho uhlangothi olungemuva luvulwa futhi luvaliwe, iphepha kufanele liphinde lidlule endaweni evulekile.Lokhu kumosha iphepha futhi kuthatha isikhathi.Ngiyakwazi ukuhambisa izintambo nezintambo zokuxhuma ngaphandle, kodwa angifuni lezi zinto zivezwe.Isixazululo esikahle ukusebenzisa inkinobho yokuvula/ukuvala engalawula iphrinta ne-Pi, engafinyelelwa ngaphandle.Kungenzeka futhi ukuthi ufinyelele imbobo yeshaja yephrinta usuka ngaphambili kwekhamera.Uma ubhekene nale phrojekthi, ngicela ucabange ukuxazulula le nkinga futhi wabelane nami ngemicabango yakho.
Into yokugcina yabantu abadala ongathuthukiswa ngayo iphrinta yamarisidi.Iphrinta engiyisebenzisayo ilungele ukuphrinta umbhalo, kodwa hhayi ezithombeni.Bengilokhu ngifuna inketho engcono kakhulu yokuthuthukisa iphrinta yami yamarisidi ashisayo, futhi ngicabanga ukuthi ngiyitholile.Ukuhlola kwami kokuqala kubonise ukuthi iphrinta yamarisidi ehambisana no-80mm ESC/POS ingase ikhiqize imiphumela engcono kakhulu.Inselele ukuthola ibhethri elincane futhi elisebenza ngebhethri.Lokhu kuzoba yingxenye ebalulekile yephrojekthi yami elandelayo yekhamera, ngicela uqhubeke nokunaka iziphakamiso zami zamakhamera ephrinta ashisayo.
PS: Lesi yisihloko eside kakhulu, ngiyaqiniseka ukuthi ngiphuthelwe imininingwane ebalulekile.Njengoba ikhamera izothuthukiswa nakanjani, ngizoyibuyekeza futhi.Ngethemba ukuthi uyayithanda le ndaba.Ungakhohlwa ukungilandela (@ade3) ku-Instagram ukuze ukwazi ukulandela lesi sithombe neminye imicimbi yami yokuthatha izithombe.Yiba nobuchule.
Mayelana nombhali: U-Adrian Hanft ungumthandi wezithombe nekhamera, umklami, nombhali we-"Zero Yomsebenzisi: Ngaphakathi Kwethuluzi" (Uziro Womsebenzisi: Ngaphakathi Kwethuluzi).Imibono evezwe kulesi sihloko ingeyombhali kuphela.Ungathola eminye imisebenzi nemisebenzi kaHanft kuwebhusayithi yakhe, ibhulogi kanye ne-Instagram.Lesi sihloko sishicilelwe lapha.
Isikhathi sokuthumela: May-04-2021