Uyenza njani ikhamera yedijithali yePolaroid kwiifoto zangoko nangoko ezishibhileyo

Kweli nqaku, ndiza kukuxelela ibali lekhamera yam yamva nje: ikhamera yedijithali yePolaroid, edibanisa umshicileli werisithi kunye neRaspberry Pi.Ukuyakha, ndathatha ikhamera ye-Polaroid Minute Maker endala, ndalahla i-guts, kwaye ndasebenzisa ikhamera yedijithali, i-E-ink display, i-receipt printer kunye nomlawuli we-SNES ukusebenzisa ikhamera endaweni yezitho zangaphakathi.Ungalibali ukundilandela ku-Instagram (@ade3).
Iphetshana elisuka kwikhamera elinefoto liyinto enomlingo.Ivelisa isiphumo esichulumancisayo, kwaye ividiyo ekwisikrini sekhamera yedijithali yale mihla iyakondla loo mincili.Iikhamera ezindala zePolaroid zisoloko zindenza buhlungu kancinane ngenxa yokuba zingoomatshini abayilwe ngokugqwesileyo, kodwa xa ifilimu iyekwa, iba yimisebenzi yobugcisa engaqhelekanga, iqokelela uthuli kwiishelufa zethu zeencwadi.Kuthekani ukuba ungasebenzisa umshicileli werisithi endaweni yefilimu ekhawulezileyo ukuzisa ubomi obutsha kwezi khamera zindala?
Xa kulula kum ukulenza, eli nqaku liza kungena kwiinkcukacha zobugcisa bendlela endenze ngayo ikhamera.Ndikwenza oku kuba ndinethemba lokuba ilinge lam liya kukhuthaza abanye abantu ukuba bazame iprojekthi ngokwabo.Olu asilolungiso olulula.Ngapha koko, oku kunokuba yeyona nto inzima yokuqhekeka kwekhamera endakha ndazama, kodwa ukuba uthatha isigqibo sokusombulula le projekthi, ndiya kuzama ukunika iinkcukacha ezaneleyo kumava am ukukuthintela ukuba ubambeke.
Kutheni kufuneka ndiyenze le nto?Emva kokuthatha ifoto ngekhamera ye-blender yekofu, ndifuna ukuzama iindlela ezimbalwa ezahlukeneyo.Ukujonga uthotho lwekhamera yam, ikhamera yePolaroid Minute Maker ngequbuliso yatsibela ngaphandle kwam kwaye yaba lolona khetho lufanelekileyo lokuguqulwa kwedijithali.Le yiprojekthi egqibeleleyo kum kuba idibanisa ezinye zezinto esele ndidlala ngazo: Raspberry Pi, E Ink bonisa kunye nomshicileli werisithi.Zidibanise, uya kufumana ntoni?Eli libali lendlela eyenziwe ngayo ikhamera yedijithali yePolaroid…
Ndibone abantu bezama iiprojekthi ezifanayo, kodwa akukho mntu wenze umsebenzi olungileyo echaza indlela abawenza ngayo.Ndiyathemba ukuyiphepha le mpazamo.Umceli mngeni wale projekthi kukwenza zonke iinxalenye ezahlukeneyo zisebenze kunye.Ngaphambi kokuba uqale ukutyhala zonke iinxalenye kwi-Polaroid case, ndincoma ukuba usasaze yonke into ngelixa uvavanya kwaye useta onke amacandelo ahlukeneyo.Oku kukuthintela ekuhlanganiseni kwakhona kunye nasekuchitheni ikhamera ngalo lonke ixesha ubetha umqobo.Ngezantsi, unokubona zonke iindawo ezidityanisiweyo kunye nezisebenzayo ngaphambi kokuba yonke into ifakwe kwimeko yePolaroid.
Ndenze ezinye iividiyo ukurekhoda inkqubela yam.Ukuba uceba ukusombulula le projekthi, ngoko kufuneka uqale ngale vidiyo yemizuzu engama-32 kuba unokubona ukuba yonke into idibana njani kwaye uqonde imingeni enokuhlangabezana nayo.
Nazi iindawo kunye nezixhobo endizisebenzisileyo.Xa yonke into ithethwa, iindleko zingadlula i-200 yeedola.Iindleko ezinkulu ziya kuba yiRaspberry Pi (35 ukuya kwi-75 yeedola zase-US), abashicileli (i-50 ukuya kwi-62 yeedola zase-US), abahloli (i-37 yeedola zase-US) kunye neekhamera (i-25 yeedola zase-US).Inxalenye enomdla kukwenza iprojekthi ibe yeyakho, ngoko ke iindleko zakho ziya kwahluka ngokuxhomekeke kwiprojekthi ofuna ukuyifaka okanye ungabandakanyi, ukuphucula okanye ukuthoba.Eli licandelo endilisebenzisayo:
Ikhamera endiyisebenzisayo yikhamera yomzuzu wePolaroid.Ukuba bendinokuphinda ndiyenze, bendiya kusebenzisa umatshini wokujingi wePolaroid kuba iluyilo olufanayo, kodwa iphaneli yangaphambili intle ngakumbi.Ngokungafaniyo neekhamera ezintsha zePolaroid, ezi modeli zinendawo eninzi ngaphakathi, kwaye zinomnyango ngasemva okuvumela ukuba uvule kwaye uvale ikhamera, ekulungele kakhulu iimfuno zethu.Yenza ukuzingela kwaye kufuneka ukwazi ukufumana enye yezi khamera zePolaroid kwiivenkile zakudala okanye kwi-eBay.Usenokukwazi ukuthenga enye ngexabiso elingaphantsi kwe-$20.Ngezantsi, unokubona iSwinger (ekhohlo) kunye noMenzi weMizuzu (ekunene).
Kwithiyori, ungasebenzisa nayiphi na ikhamera yePolaroid kolu hlobo lweprojekthi.Ndikwanayo neekhamera zomhlaba ezinezivuthe kwaye zisonge, kodwa inzuzo yeSwinger okanye uMenzi weMizuzu kukuba zenziwe ngeplastiki enzima kwaye azinamalungu amaninzi ashukumayo ngaphandle komnyango ongasemva.Inyathelo lokuqala kukuhluba onke amathumbu kwikhamera ukwenza indawo yazo zonke iimveliso zethu zombane.Yonke into kufuneka yenziwe.Ekugqibeleni, uya kubona imfumba yenkunkuma, njengoko kubonisiwe ngezantsi:
Uninzi lwamacandelo ekhamera anokususwa ngeepliers kunye ne-brute force.Ezi zinto azikahlulwa, ngoko uya kulwa neglu kwezinye iindawo.Ukususa umphambili wePolaroid kunzima ngakumbi kunokuba kubonakala.Kukho izikrufu ngaphakathi kwaye ezinye izixhobo ziyafuneka.Ngokucacileyo yiPolaroid kuphela enabo.Uyakwazi ukukhulula nge pliers, kodwa ndancama ndawanyanzela ukuba avale.Xa ndicinga, kufuneka ndihlawule ngakumbi apha, kodwa umonakalo endiwubangeleyo unokulungiswa nge-super glue.
Nje ukuba uphumelele, uya kuphinda ulwe namalungu angafanele ahlulwe.Ngokufanayo, iipliers kunye ne-brute force iyafuneka.Qaphela ukuba ungonakalisi nantoni na ebonakalayo ngaphandle.
I-lens yenye yezinto ezinobuqili ukususa.Ngaphandle kokubhoboza umngxuma kwiglasi / iplastiki kunye nokuyikhupha, andizange ndicinge ngezinye izisombululo ezilula.Ndifuna ukugcina inkangeleko yelensi kangangoko ndinako ukuze abantu bangakwazi nokuyibona ikhamera yeRaspberry Pi esembindini weringi emnyama apho ilensi yalungiswa khona ngaphambili.
Kwividiyo yam, ndibonise ngaphambi nasemva kokuthelekisa iifoto zePolaroid, ukuze ukwazi ukubona kanye into ofuna ukuyicima kwikhamera.Qaphela ukuqinisekisa ukuba iphaneli yangaphambili inokuvulwa kwaye ivalwe ngokulula.Cinga ngephaneli njengento yokuhombisa.Kwiimeko ezininzi, iya kulungiswa endaweni, kodwa ukuba ufuna ukudibanisa i-Raspberry Pi kwi-monitor kunye nebhodibhodi, unokususa ipaneli yangaphambili kunye neplagi kumthombo wamandla.Ungaphakamisa eyakho isisombululo apha, kodwa ndigqibe kwelokuba ndisebenzise iimagnethi njengendlela yokubamba indawo yolawulo endaweni.I-Velcro ibonakala intekenteke kakhulu.Izikrufu zininzi kakhulu.Lo ngumfanekiso oshukumayo obonisa ukuvulwa kwekhamera kunye nokuvala indawo yolawulo:
Ndikhethe iRaspberry Pi 4 Model B epheleleyo endaweni yePi Zero encinci.Oku kuyinxalenye yokunyusa isantya kwaye ngokuyinxenye kuba ndimtsha kwibala leRaspberry Pi, ke ndiziva ndikhululekile ukuyisebenzisa.Ngokucacileyo, iPi Zero encinci iya kudlala izibonelelo ezithile kwindawo emxinwa yePolaroid.Intshayelelo yeRaspberry Pi ingaphaya komda wale tutorial, kodwa ukuba umtsha kwiRaspberry Pi, zininzi izixhobo ezikhoyo apha.
Ingcebiso ngokubanzi kukuthatha ixesha kwaye ube nomonde.Ukuba uvela kwimvelaphi yeMac okanye yePC, ke uya kufuna ixesha lokuziqhelanisa neenuances zePi.Kufuneka uqhelane nomgca womyalelo kwaye ulawule izakhono zokubhala zePython.Ukuba oku kukwenza uzive usoyika (bendisoyika ekuqaleni!), nceda ungabi nomsindo.Logama usamkela ngokuzingisa nomonde, uya kuyifumana.Ukukhangela kwi-Intanethi kunye nokunyamezela kunokoyisa phantse yonke imiqobo odibana nayo.
Ifoto engasentla ibonisa apho iRaspberry Pi ibekwe khona kwikhamera yePolaroid.Ungayibona indawo yoqhagamshelo lonikezelo lwamandla ekhohlo.Kwakhona qaphela ukuba umgca wokwahlula ongwevu udlulela kububanzi bokuvula.Ngokusisiseko, oku kukwenza umshicileli ancike kuyo kwaye ahlule iPi kumshicileli.Xa uplaga kumshicileli, kufuneka uqaphele ukuba ungaphuli iphini elikhonjwe ngepensile kwifoto.Intambo yokubonisa idibanisa nezikhonkwane apha, kwaye isiphelo socingo oluza kunye nomboniso malunga nekota ye-intshi ubude.Kwafuneka ndandise iziphelo zeentambo kancinane ukuze umshicileli angazicinezeli kuzo.
I-Raspberry Pi kufuneka ibekwe ukuze icala elinezibuko le-USB libhekiselele ngaphambili.Oku kuvumela isilawuli se-USB ukuba siqhagamshelwe ukusuka ngaphambili usebenzisa i-adapter emile okwe-L.Nangona le yayingeyonxalenye yesicwangciso sam sokuqala, ndandisasebenzisa intambo encinci ye-HDMI ngaphambili.Oku kundivumela ukuba ndikhuphe ngokulula ipaneli kwaye emva koko ndiqhoboshele imonitha kunye nekhibhodi kwiPi.
Ikhamera yimodyuli yeRaspberry Pi V2.Umgangatho awulunganga njengekhamera ye-HQ entsha, kodwa asinayo indawo eyaneleyo.Ikhamera iqhagamshelwe kwiRaspberry Pi ngeribhoni.Sika umngxuma obhityileyo phantsi kwelensi apho iribhoni inokudlula khona.Iribhoni kufuneka ijijelwe ngaphakathi ngaphambi kokuxhuma kwiRaspberry Pi.
Iphaneli yangaphambili yePolaroid inomphezulu osicaba, ofanelekileyo ukunyuswa kwekhamera.Ukuyifakela, ndasebenzisa itheyiphu enamacala amabini.Kufuneka ulumke ngasemva kuba kukho iinxalenye ze-elektroniki kwibhodi yekhamera ongafuni ukuwonakalisa.Ndisebenzise iziqwenga zeteyiphu njengezikhewu ukunqanda la malungu ukuba angatyunyuzwa.
Kukho amanqaku amabini okufuneka uwaqaphele kwifoto engentla, unokubona indlela yokufikelela kwi-USB kunye ne-HDMI port.Ndisebenzise iadaptha ye-USB enobume be-L ukukhomba uqhagamshelo ekunene.Kwintambo ye-HDMI ekhoneni eliphezulu lasekhohlo, ndasebenzisa intambo yokwandisa i-intshi ye-6 kunye ne-L-shaped connector kwelinye icala.Ungayibona ngcono le nto kwividiyo yam.
I-E Ink ibonakala ilukhetho oluhle kwi-monitor kuba umfanekiso ufana kakhulu nomfanekiso oprintwe kwiphepha lerisithi.Ndisebenzise i-Waveshare ye-4.2-intshi yemodyuli yokubonisa inki ye-elektroniki kunye ne-400 × 300 pixels.
I-inki ye-elektroniki inomgangatho we-analog endiwuthandileyo.Ikhangeleka njengephepha.Kuyanelisa ngenene ukubonisa imifanekiso kwiscreen ngaphandle kwamandla.Kuba akukho kukhanya ukunika amandla iipikseli, xa umfanekiso udaliwe, uhlala esikrinini.Oku kuthetha ukuba nokuba akukho mandla, ifoto isala ngasemva kwePolaroid, endikhumbuza ukuba yintoni ifoto yokugqibela endiyithathileyo.Ukunyaniseka, ixesha lokuba ikhamera ibekwe kwithala lam leencwadi lide kakhulu kunaxa isetyenziswa, ukuba nje ikhamera ingasetyenziswa, ikhamera iya phantse ibe yifreyimu yesithombe, olu khetho oluhle.Ukonga amandla akubalulekanga.Ngokwahlukileyo kwiziboniso ezisekelwe ekukhanyeni ezihlala zidla amandla, i-E Ink idla kuphela amandla xa ifuna ukuphinda iphindwe.
Iziboniso ze-inki ze-elektroniki zikwanazo nezingeloncedo.Eyona nto inkulu sisantya.Xa kuthelekiswa neziboniso ezisekwe kukukhanya, kuthatha ixesha elide kuphela ukuvula okanye ukucima ipikseli nganye.Enye into engalunganga kukuhlaziya isikrini.Imonitha ye-Ink ebiza kakhulu inokuhlaziywa kancinci, kodwa imodeli enexabiso eliphantsi iya kutsala kwakhona isikrini sonke ngalo lonke ixesha kukho utshintsho.Isiphumo kukuba isikrini siba mnyama namhlophe, kwaye ke umfanekiso uvela phezulu phambi kokuba kuvele umfanekiso omtsha.Kuthatha kuphela isekhondi enye ukuqhwanyaza, kodwa yongeza.Lilonke, kuthatha imizuzwana emi-3 ukuba esi sikrini sihlaziywe ukusuka kwixesha lokucofa iqhosha ukuya kuthi ga xa kuvela ifoto esikrinini.
Enye into ekufuneka uyigcine engqondweni kukuba, ngokungafaniyo neziboniso zekhompyuter ezibonisa iidesktops kunye neempuku, kufuneka wahluke nge-e-ink displays.Ngokusisiseko, uxelela imonitha ukuba ibonise umxholo ngepixel enye ngexesha.Ngamanye amazwi, oku akusiyo iplagi kunye nokudlala, udinga ikhowudi ethile ukufezekisa oku.Ngalo lonke ixesha umfanekiso uthathwa, umsebenzi wokuzoba umfanekiso kwimonitha uyenziwa.
I-Waveshare ibonelela ngabaqhubi bemiboniso yayo, kodwa amaxwebhu ayo ayoyikeka.Cwangcisa ukuchitha ixesha elithile ulwa nemonitha phambi kokuba isebenze kakuhle.Olu luxwebhu lwekhusi endilisebenzisayo.
Umboniso uneengcingo ezi-8, kwaye uya kudibanisa ezi ngcingo kwizikhonkwane zeRaspberry Pi.Ngokuqhelekileyo, ungasebenzisa kuphela intambo ezayo kunye ne-monitor, kodwa ekubeni sisebenza kwindawo emxinwa, kufuneka ndandise isiphelo sentambo singabi phezulu kakhulu.Oku konga malunga nekota ye-intshi yendawo.Ndicinga ukuba esinye isisombululo kukusika iplastiki eninzi kumshicileli werisithi.
Ukudibanisa umboniso ngasemva kwePolaroid, uya kubhoboza imingxuma emine.Imonitha inemingxuma yokufakwa kwiikona.Beka umboniso kwindawo oyifunayo, qiniseka ukuba ushiya isithuba esingezantsi ukuze uveze iphepha lerisithi, uze uphawule kwaye ubhoboze imingxuma emine.Emva koko qinisa isikrini ukusuka ngasemva.Kuya kubakho umsantsa we-intshi ye-1/4 phakathi komva wePolaroid kunye nomva wemonitha.
Unokucinga ukuba umboniso we-inki ye-elektroniki unzima kakhulu kunokuba ufanelekile.Usenokuba ulungile.Ukuba ukhangele inketho elula, unokufuna ukujonga i-monitor encinci yombala enokuthi idibaniswe nge-HDMI port.Ububi kukuba uya kuhlala ujonge kwidesktop yeRaspberry Pi yenkqubo yokusebenza, kodwa inzuzo kukuba ungayiplaga kwaye uyisebenzise.
Kusenokufuneka uphonononge indlela umshicileli werisithi osebenza ngayo.Abayisebenzisi i-inki.Endaweni yoko, aba bashicileli basebenzisa iphepha le-thermal.Andiqinisekanga ngokupheleleyo ukuba iphepha lenziwe njani, kodwa unokucinga ngalo njengomzobo obushushu.Xa ubushushu bufikelela kwi-270 degrees Fahrenheit, iindawo ezimnyama ziveliswa.Ukuba umqulu wephepha kufuneka ushushu ngokwaneleyo, uya kuba mnyama ngokupheleleyo.Inzuzo enkulu apha kukuba akukho mfuneko yokusebenzisa inki, kwaye xa kuthelekiswa nefilimu ye-Polaroid yangempela, akukho zimpendulo zekhemikhali eziyinkimbinkimbi ezifunekayo.
Kukho nokungalunganga kokusebenzisa iphepha le-thermal.Ngokucacileyo, unokusebenza kuphela kumnyama nomhlophe, ngaphandle kombala.Nangona kuluhlu olumnyama nomhlophe, akukho mithunzi yegrey.Kufuneka uzobe umfanekiso ngokupheleleyo ngamachaphaza amnyama.Xa uzama ukufumana umgangatho ophezulu kangangoko kwezi ngongoma, ngokuqinisekileyo uya kuwela kwingxaki yokuqonda i-jitter.Ingqwalasela ekhethekileyo kufuneka ihlawulwe kwi-algorithm ye-Floyd-Steinberg.Ndiza kukuyeka uhambe wedwa kula mvundla.
Xa uzama ukusebenzisa iisetingi ezahlukeneyo kunye neendlela zokudibanisa, ngokuqinisekileyo uya kudibana nemicu emide yeefoto.Le yinxalenye yee-selfies ezininzi endiziphucule kwimveliso efanelekileyo yomfanekiso.
Ngokomntu, ndiyayithanda inkangeleko yemifanekiso emdaka.Xa basifundisa indlela yokupeyinta ngokusebenzisa i-stippling, yandikhumbuza iklasi yam yokuqala yobugcisa.Yinkangeleko eyodwa, kodwa yahlukile kudidi olugudileyo lokufota okumnyama namhlophe esiye saqeqeshwa ukuba sikuxabise.Nditsho oku kuba le khamera iyatenxa kwisithethe kwaye imifanekiso ekhethekileyo eyivelisayo kufuneka ithathwe “njengomsebenzi” wekhamera, hayi “impazamo”.Ukuba sifuna umfanekiso wokuqala, sinokusebenzisa nayiphi na enye ikhamera yabathengi kwimarike kwaye songe imali ngaxeshanye.Inqaku apha kukwenza into eyodwa.
Ngoku ukuba uyaluqonda ushicilelo lwe-thermal, masithethe malunga nabashicileli.Iprinta yerisithi endiyisebenzisileyo yathengwa kwa-Adafruit.Ndithenge i-"Mini Thermal Receipt Printer Starter Pack" yabo, kodwa ungayithenga ngokwahlukileyo xa kuyimfuneko.Kwithiyori, awudingi ukuthenga ibhetri, kodwa unokufuna iadaptha yamandla ukuze uyixhume eludongeni ngexesha lovavanyo.Enye into entle kukuba i-Adafruit inee-tutorials ezilungileyo eziya kukunika ukuzithemba ukuba yonke into iya kuqhubeka ngokwesiqhelo.Qala kule nto.
Ndiyathemba ukuba umshicileli angangena kwiPolaroid ngaphandle kotshintsho.Kodwa inkulu kakhulu, ke kuya kufuneka unciphise ikhamera okanye unciphise umshicileli.Ndikhethe ukucokisa umshicileli kuba inxalenye yesibheno seprojekthi yayikukugcina inkangeleko yePolaroid kangangoko.I-Adafruit ikwathengisa iirisithi zeeprinta ngaphandle kwebhokisi.Oku konga indawo kunye needola ezimbalwa, kwaye ngoku ndiyazi ukuba yonke into isebenza njani, ndingasebenzisa ixesha elizayo xa ndakha into enje.Nangona kunjalo, oku kuya kuzisa umngeni omtsha, oyile, indlela yokumisela indlela yokuphatha umqulu wephepha.Iiprojekthi ezifana nezi zimalunga nokulalanisa kunye nemingeni yokukhetha ukuyisombulula.Ungabona ngezantsi kwefoto i-engile ekufuneka isikiwe ukwenza umshicileli ulingane.Oku kusikwa kuya kufuneka kwakhona ukuba kwenzeke kwicala lasekunene.Xa usika, nceda ulumkele ukunqanda iingcingo zomshicileli kunye nesixhobo sombane sangaphakathi.
Enye ingxaki ngabashicileli be-Adafruit kukuba umgangatho uyahluka ngokuxhomekeke kumthombo wamandla.Bancoma ukusebenzisa umbane we-5v.Iyasebenza, ngakumbi kushicilelo olusekwe kwisicatshulwa.Ingxaki kukuba xa uprinta umfanekiso, iindawo ezimnyama zivame ukuqaqamba.Amandla afunekayo ukutshisa lonke ububanzi bephepha likhulu kakhulu kunaxa kushicilelwa umbhalo, ngoko iindawo ezimnyama zinokuba ngwevu.Kunzima ukukhalaza, aba bashicileli abadalelwanga ukuprinta iifoto emva kwayo yonke into.Umshicileli akakwazi ukwenza ubushushu obaneleyo kububanzi bephepha ngexesha.Ndizamile ezinye iintambo zombane ezineziphumo ezahlukeneyo, kodwa andibanga nampumelelo ingako.Okokugqibela, kuyo nayiphi na imeko, kufuneka ndisebenzise iibhetri ukuyinika amandla, ngoko ke ndiyekile umfuniselo wentambo yombane.Ngokungalindelekanga, i-7.4V 850mAh Li-PO ibhetri etshajwayo endiyikhethileyo yenza isiphumo soshicilelo sayo yonke imithombo yamandla endiyivavanyeyo emnyama kakhulu.
Emva kokufaka umshicileli kwikhamera, sika umngxuma phantsi kwemonitha ukulungelelanisa nephepha eliphuma kumshicileli.Ukusika iphepha lerisithi, ndasebenzisa incakuba yesisiki esidala seteyiphu yokupakisha.
Ukongeza kwimveliso emnyama yamabala, enye i-disadvantage i-banding.Nanini na xa umshicileli enqumama ukubamba idatha eyondliwayo, iyakushiya isithuba esincinci xa iqala ukuprinta kwakhona.Kwithiyori, ukuba unokuphelisa isithinteli kwaye uvumele umjelo wedatha ngokuqhubekekayo ukondla kumshicileli, ungawunqanda lo msantsa.Ngokwenene, oku kubonakala kuyinketho.Iwebhusayithi ye-Adafruit ikhankanya iipushpins ezingabhalwanga kumshicileli, ezinokusetyenziswa ukugcina izinto zingqamanise.Khange ndiyivavanye lento kuba andiyazi ukuba isebenza njani.Ukuba usombulula le ngxaki, nceda wabelane nam ngempumelelo yakho.Le yenye ibhetshi yee-selfies apho unokubona ngokucacileyo iibhendi.
Kuthatha imizuzwana engama-30 ukuprinta ifoto.Le yividiyo yomshicileli osebenzayo, ngoko unokuva ukuba kuthatha ixesha elingakanani ukuprinta umfanekiso.Ndiyakholelwa ukuba le meko inokunyuka ukuba i-Adafruit hacks iyasetyenziswa.Ndiyarhana ukuba isithuba sexesha phakathi koshicilelo lilibazisekile, nto leyo ethintela umshicileli ukuba angagqithe kwisantya sedatha yedatha.Ndithetha oku kuba ndifunde ukuba iphepha elingaphambili kufuneka lidityaniswe nentloko yomshicileli.Ndisenokuba andilunganga.
Kanye njengomboniso we-ink, kuthatha umonde ukwenza umshicileli asebenze.Ngaphandle komqhubi woshicilelo, usebenzisa ikhowudi ukuthumela idatha ngokuthe ngqo kumshicileli.Ngokufanayo, esona sixhobo silungileyo sinokuba yiwebhusayithi ye-Adafruit.Ikhowudi kwindawo yam yokugcina yeGitHub iguqulwe kwimizekelo yabo, ke ukuba udibana nobunzima, amaxwebhu e-Adafruit aya kuba lolona khetho lwakho lulungileyo.
Ukongeza kwizinto eziluncedo ze-nostalgic kunye ne-retro, inzuzo yesilawuli se-SNES kukuba indinika ulawulo oluthile endingafanelanga ukuba ndicinge ngalo kakhulu.Kufuneka ndigxile ekufumaneni ikhamera, umshicileli, kunye nokubeka iliso ukuze kusebenze kunye, kwaye ndibe nomlawuli osele ekhona onokuthi enze imaphu yemisebenzi yam ngokukhawuleza ukwenza izinto zibe lula.Ukongeza, sele ndinamava usebenzisa isilawuli sam seKhamera yeCoffee Stirrer, ukuze ndiqalise ngokulula.
Umlawuli ongasemva uqhagamshelwe ngentambo ye-USB.Ukuthatha ifoto, cofa iqhosha A.Ukuprinta umfanekiso, cofa iqhosha B.Ukucima umfanekiso, cofa iqhosha lika-X.Ukucima umboniso, ndingacofa iqhosha likaY.Khange ndisebenzise amaqhosha okuqala/akhethe okanye amaqhosha asekhohlo/asekunene phezulu, ngoko ke ukuba ndinezimvo ezintsha kwixesha elizayo, asenokusetyenziselwa iimpawu ezintsha.
Ngokuphathelele amaqhosha etolo, amaqhosha asekhohlo nasekunene ephedi yesitshixo azakujikeleza kuyo yonke imifanekiso endiyithathileyo.Ukucofa phezulu akuwenzi nawuphi na umsebenzi okwangoku.Ukucofa kuya kuqhubela phambili iphepha leprinta yerisithi.Oku kulula kakhulu emva kokushicilela umfanekiso, ndifuna ukutshica iphepha elingakumbi ngaphambi kokulikrazula.Ukwazi ukuba umshicileli kunye neRaspberry Pi bayanxibelelana, oku kwakhona luvavanyo olukhawulezayo.Ndacofa, ndaza ndathi ndakusiva amaphepha aphumayo, ndaqonda ukuba ibhetri yeprinta isatshaja yaye ikulungele ukusebenza.
Ndisebenzise iibhetri ezimbini kwikhamera.Enye inika amandla iRaspberry Pi kwaye enye inika amandla umshicileli.Kwithiyori, ningabaleka nonke ngonikezelo lwamandla olufanayo, kodwa andiqondi ukuba unawo amandla awoneleyo okuqhuba umshicileli ngokupheleleyo.
KwiRaspberry Pi, ndithenge ibhetri encinci endinokuyifumana.Ukuhlala phantsi kwePolaroid, uninzi lwazo lufihliwe.Andiyithandi into yokuba intambo yamandla kufuneka idlule ukusuka ngaphambili ukuya emngxunyeni ngaphambi kokuxhuma kwiRaspberry Pi.Mhlawumbi ungafumana indlela yokucudisa enye ibhetri kwiPolaroid, kodwa akukho ndawo ingako.Ukungalungi kokubeka ibhetri ngaphakathi kukuba kufuneka uvule isiciko esingasemva ukuze uvule kwaye uvale isixhobo.Khipha nje ibhetri ukucima ikhamera, olona khetho lulungileyo.
Ndisebenzise intambo ye-USB kunye ne-on / off switch evela kwi-CanaKit.Ndisenokuba mhle kakhulu kulo mbono.Ndicinga ukuba iRaspberry Pi ingavulwa kwaye icinywe ngeli qhosha nje.Ngapha koko, ukukhulula i-USB kwibhetri kulula nje.
Kumshicileli, ndisebenzise ibhetri ye-850mAh Li-PO etshajwayo.Ibhetri efana nale ineengcingo ezimbini eziphuma kuyo.Enye yimveliso kwaye enye yitshaja.Ukuze ndifezekise "uxhulumaniso olukhawulezayo" kwimveliso, kwafuneka nditshintshe isidibaniso kunye neenjongo eziqhelekileyo ze-3-wire connector.Oku kuyimfuneko kuba andifuni ukususa umshicileli wonke ngalo lonke ixesha ndifuna ukuqhawula amandla.Kungangcono ukutshintshela apha, kwaye ndingayiphucula kwixesha elizayo.Ngcono nangakumbi, ukuba iswitshi ingaphandle kwekhamera, ngoko ndingakhupha umshicileli ngaphandle kokuvula umnyango ongasemva.
Ibhetri ibekwe emva komshicileli, kwaye nditsale intambo ukuze ndikwazi ukudibanisa kwaye ndikhuphe umbane njengoko kufuneka.Ukuze uhlawule ibhetri, uqhagamshelo lwe-USB lukwabonelelwa ngebhetri.Ndikwacacisile oku kwividiyo, ke ukuba ufuna ukuqonda ukuba isebenza njani, nceda uyijonge.Njengoko benditshilo, inzuzo emangalisayo kukuba olu seto luvelisa iziphumo ezingcono zokuprinta xa kuthelekiswa nokudibanisa ngokuthe ngqo eludongeni.
Apha kulapho kufuneka ndibonelele khona i-disclaimer.Ndiyakwazi ukubhala iPython esebenzayo, kodwa andinakuthi intle.Ewe kunjalo, kukho iindlela ezingcono zokwenza oku, kwaye abadwelisi benkqubo abangcono banokuyiphucula kakhulu ikhowudi yam.Kodwa njengoko benditshilo, iyasebenza.Ke ngoko, ndiza kubelana nawe ngovimba wam weGitHub, kodwa ngenene andinako ukunika inkxaso.Ndiyathemba ukuba oku kwanele ukukubonisa into endiyenzayo kwaye ungayiphucula.Yabelana nam ngophuculo lwakho, ndiya kuvuya ukuhlaziya ikhowudi yam kwaye ndikunike ikhredithi.
Ngoko ke, kucingelwa ukuba usete ikhamera, esweni kunye nomshicileli, kwaye unokusebenza ngokuqhelekileyo.Ngoku ungaqhuba iskripthi sam sePython esibizwa ngokuba “digital-polaroid-camera.py”.Ekugqibeleni, kufuneka usete iRaspberry Pi ukuba iqhube ngokuzenzekelayo esi script ekuqaleni, kodwa okwangoku, ungayiqhuba ukusuka kumhleli wePython okanye i-terminal.Oku kulandelayo kuya kwenzeka:
Ndizamile ukongeza izimvo kwikhowudi ukuchaza okwenzekileyo, kodwa kukho into eyenzekayo ngelixa ndithatha ifoto kwaye kufuneka ndichaze ngakumbi.Xa ifoto ithathwa, ngumfanekiso onombala opheleleyo, opheleleyo.Umfanekiso ugcinwa kwifolda.Oku kulungele kuba ukuba ufuna ukuyisebenzisa kamva, uya kuba nesithombe esinesisombululo esiphezulu esiqhelekileyo.Ngamanye amazwi, ikhamera isenza iJPG eqhelekileyo njengezinye iikhamera zedijithali.
Xa ifoto ithathwa, kuya kwenziwa umfanekiso wesibini, olungiselelwe umboniso kunye noshicilelo.Usebenzisa i-ImageMagick, unokutshintsha ubungakanani befoto yokuqala kwaye uyiguqule ibemnyama namhlophe, emva koko ufake i-Floyd Steinberg dithering.Ndingakwazi kwakhona ukonyusa umahluko kweli nyathelo, nangona olu phawu lucinyiwe ngokungagqibekanga.
Umfanekiso omtsha ugcinwe kabini.Okokuqala, yigcine njengejpg emnyama namhlophe ukuze ijongwe kwaye isetyenziswe kwakhona kamva.Ugcino lwesibini luyakwenza ifayile ngolwandiso lwe-.py.Le ayisiyofayile yomfanekiso eqhelekileyo, kodwa yikhowudi ethatha lonke ulwazi lwepikseli kumfanekiso kwaye iyiguqulele kwidatha enokuthunyelwa kumshicileli.Njengoko benditshilo kwicandelo lomshicileli, eli nyathelo liyimfuneko kuba akukho mqhubi woshicilelo, ngoko awukwazi ukuthumela imifanekiso eqhelekileyo kumshicileli.
Xa iqhosha licofa kwaye umfanekiso uprintwe, kukho neekhowudi ze-beep.Oku kukhetho, kodwa kulungile ukufumana ingxelo evakalayo ukukwazisa ukuba kukho into eyenzekayo.
Ngexesha lokugqibela, andikwazanga ukuxhasa le khowudi, kukukhomba kwicala elifanelekileyo.Nceda uyisebenzise, ​​uyiguqule, uyiphucule kwaye uzenzele ngokwakho.
Le yiprojekthi enomdla.Ukujonga emva, ndiza kwenza into eyahlukileyo okanye mhlawumbi ndiyihlaziye kwixesha elizayo.Eyokuqala ngumlawuli.Nangona umlawuli we-SNES enokwenza kanye le nto ndifuna ukuyenza, sisisombululo esinzima.Ucingo luvaliwe.Ikunyanzela ukuba ubambe ikhamera ngesandla esinye kunye nesilawuli kwesinye.Iintloni ke.Esinye isisombululo sinokuba kukukhupha amaqhosha avela kumlawuli kwaye uwadibanise ngqo kwikhamera.Nangona kunjalo, ukuba ndifuna ukusombulula le ngxaki, ndinokuthi ndiyilahle ngokupheleleyo i-SNES kwaye ndisebenzise amaqhosha emveli.
Enye into ephazamisayo yekhamera kukuba ngalo lonke ixesha ikhamera ivuliwe okanye ivaliwe, i-cover yangemuva kufuneka ivulwe ukukhupha umshicileli kwibhetri.Kubonakala ngathi le nto yinto encinci, kodwa ngalo lonke ixesha icala elingasemva livulwa kwaye livaliwe, iphepha kufuneka liphinde ligqitywe ngokuvula.Oku kuchitha elinye iphepha kwaye kuthatha ixesha.Ndiyakwazi ukuhambisa iingcingo kunye neengcingo zokudibanisa ngaphandle, kodwa andifuni ezi zinto zivele.Isisombululo esifanelekileyo kukusebenzisa i-on / off switch enokulawula umshicileli kunye ne-Pi, enokufikelela ngaphandle.Kusenokwenzeka ukuba ufikelele kwizibuko letshaja yomshicileli kumphambili wekhamera.Ukuba ujongene nale projekthi, nceda ucinge ngokusombulula le ngxaki kwaye wabelane ngeengcinga zakho nam.
Into yokugqibela ekhulileyo yokuphucula ngumshicileli werisithi.Umshicileli endiwusebenzisayo ulungile kushicilelo lokubhaliweyo, kodwa hayi kwiifoto.Bendijonge olona khetho lokuphucula umshicileli wam werisithi eshushu, kwaye ndicinga ukuba ndiyifumene.Iimvavanyo zam zokuqala zibonise ukuba umshicileli werisithi ohambelana ne80mm ESC/POS unokuvelisa ezona ziphumo zingcono.Umceli mngeni kukufumana ibhetri encinci kwaye inamandla ebhetri.Oku kuya kuba yinxalenye ephambili yeprojekthi yam elandelayo yekhamera, nceda uqhubeke nokunikela ingqalelo kwiingcebiso zam zeekhamera zomshicileli we-thermal.
PS: Eli linqaku elide kakhulu, ndiqinisekile ukuba ndiphoswe neenkcukacha ezibalulekileyo.Njengoko ikhamera iya kuphuculwa ngokuqinisekileyo, ndiya kuyihlaziya kwakhona.Ndiyathemba ukuba uyalithanda eli bali.Ungalibali ukundilandela (@ade3) ku-Instagram ukuze ukwazi ukulandela le foto kunye nolunye uhambo lwam lokufota.Yiba nobuchule.
Malunga nombhali: U-Adrian Hanft ngumfoti kunye nomthandi wekhamera, umyili, kunye nombhali we "User Zero: Ngaphakathi kweSixhobo" (User Zero: Ngaphakathi kweSixhobo).Iimbono ezichazwe kweli nqaku zezo zombhali kuphela.Ungafumana imisebenzi emininzi kunye nemisebenzi ye-Hanft kwiwebhusayithi yakhe, ibhlog kunye ne-Instagram.Eli nqaku likwapapashwa apha.


Ixesha lokuposa: May-04-2021