Muchikamu chino, ini ndichakuudza nyaya yekamera yangu yazvino kamera: digitaalinen Polaroid kamera, iyo inosanganisa risiti printer neRaspberry Pi.Kuti ndivake, ndakatora kamera yekare yePolaroid Minute Maker, ndakabvisa guts, uye ndakashandisa digital kamera, E-ink display, receipt printer uye SNES controller kuti ishandise kamera panzvimbo yenhengo dzomukati.Usakanganwa kunditevera pa Instagram (@ade3).
Pepa kubva pakamera rine mufananidzo rine mashiripiti.Iyo inoburitsa inonakidza mhedzisiro, uye vhidhiyo iri pachiratidziro chemazuva ano dhijitari kamera inokupa iwe kufara ikoko.Makamera ekare ePolaroid anogara achindisuruvarisa zvishoma nekuti michina yakagadzirwa zvakanakisa, asi kana bhaisikopo rikamiswa, anova mabasa eunyanzvi akashata, achiunganidza huruva pamasherufu edu emabhuku.Ko kana ukagona kushandisa risiti printa pane firimu rekare kuunza hupenyu hutsva kumakamera aya ekare?
Kana zviri nyore kwandiri kuti ndizviite, chinyorwa ichi chinozonyura mune zvehunyanzvi zvemagadzirirwo andakaita kamera.Ndinoita izvi nekuti ndinovimba kuti kuedza kwangu kuchakurudzira vamwe vanhu kuti vaedze chirongwa ichi vega.Iyi haisi nyore kugadzirisa.Muchokwadi, uku kungave kwakaomesesa kutsemuka kwekamera kwandati ndamboedza, asi kana ukafunga kugadzirisa chirongwa ichi, ini ndichaedza kupa ruzivo rwakakwana kubva pane yangu ruzivo kuti urege kunamira.
Nei ndichifanira kuita izvi?Mushure mekutora pfuti nekamera yangu yekofi blender, ndinoda kuedza nzira shoma dzakasiyana.Ndichitarisa kutevedzana kwekamera yangu, iyo Polaroid Minute Mugadziri kamera yakangoerekana yasvetuka kubva mandiri ikava sarudzo yakanaka yekushandurwa kwedhijitari.Iyi ipurojekiti yakandinakira nekuti inosanganisa zvimwe zvezvinhu zvandiri kutotamba nazvo: Raspberry Pi, E Ink kuratidza uye risiti printer.Zviise pamwe chete, chii chauchawana?Iyi ndiyo nyaya yemagadzirirwo akaitwa kamera yangu yedigital Polaroid…
Ndakaona vanhu vachiedza mapurojekiti akafanana, asi hapana akaita basa rakanaka achitsanangura kuti vanozviita sei.Ndinotarisira kudzivisa kukanganisa uku.Dambudziko rechirongwa ichi nderekuita kuti zvikamu zvakasiyana-siyana zvishande pamwe chete.Usati watanga kusundira zvikamu zvese muPolaroid kesi, ini ndinokurudzira kuti iwe uparadzire zvese kunze uchiyedza uye nekumisikidza ese akasiyana zvikamu.Izvi zvinokutadzisa kuunganidza zvakare nekubvisa kamera pese paunorova chipingamupinyi.Pazasi, iwe unogona kuona ese akabatana uye anoshanda zvikamu zvese zvisati zvaiswa muPolaroid kesi.
Ndakaita mamwe mavhidhiyo kurekodha mafambiro angu.Kana ukaronga kugadzirisa chirongwa ichi, saka iwe unofanirwa kutanga neiyi 32-maminetsi vhidhiyo nekuti unogona kuona kuti zvese zvinopindirana sei uye kunzwisisa matambudziko angangosangana nawo.
Heano zvikamu uye zvishandiso zvandaishandisa.Kana zvese zvataurwa, mutengo unogona kudarika $200.Mari inodhura ichange iri Raspberry Pi (35 kusvika 75 US madhora), maprinta (50 kusvika 62 US madhora), monitors (37 US madhora) uye makamera (25 US madhora).Chikamu chinonakidza ndechekuita purojekiti yako, saka mari yako ichave yakasiyana zvichienderana nepurojekiti yaunoda kuisa kana kusabvisa, kusimudzira kana kuderedza.Ichi ndicho chikamu chandinoshandisa:
Iyo kamera yandinoshandisa iPolaroid miniti kamera.Dai ndaizozviita zvakare, ndaizoshandisa Polaroid swing muchina nekuti ndiwo chaiwo dhizaini, asi pamberi pepaneru yakanyanya kunaka.Kusiyana nemakamera matsva ePolaroid, aya mamodheru ane nzvimbo yakawanda mukati, uye ane musuwo kumashure unokubvumira kuti uvhure uye uvhare kamera, iyo iri nyore kwazvo kune zvatinoda.Ita zvimwe zvekuvhima uye iwe unofanirwa kuwana imwe yeaya makamera ePolaroid muzvitoro zvekare kana paBay.Unogona kutenga imwe nemari isingasviki $20.Pazasi, iwe unogona kuona Swinger (kuruboshwe) uye Minute Mugadziri (kurudyi).
Mune dzidziso, unogona kushandisa chero Polaroid kamera yerudzi urwu rweprojekiti.Ini zvakare ndine mamwe makamera epasi ane mabhero uye akapetwa kumusoro, asi mukana weSwinger kana Minute Mugadziri ndewekuti akagadzirwa nepurasitiki yakaoma uye haana akawanda anofamba kunze kwegonhi rekuseri.Danho rekutanga nderekubvisa matumbu ese kubva pakamera kuita nzvimbo yezvese zvigadzirwa zvemagetsi.Zvose zvinofanira kuitwa.Pakupedzisira, iwe uchaona murwi wemarara, sezvinoratidzwa pasi apa:
Zvizhinji zvikamu zvekamera zvinogona kubviswa ne pliers uye brute force.Zvinhu izvi hazvina kupatsanurwa, saka uchanetseka neglue kune dzimwe nzvimbo.Kubvisa kumberi kwePolaroid kwakaoma kupfuura zvinoita.Kune ma screw mukati uye mamwe maturusi anodiwa.Zviripachena chete Polaroid inazvo.Unogona kuakurura nemapini, asi ndakakanda mapfumo pasi ndikavamanikidza kuvhara.Mukuona, ndinofanira kubhadhara zvakanyanya pano, asi kukanganisa kwandakaita kunogona kugadziriswa ne super glue.
Kana uchinge wabudirira, iwe uchazorwisa zvakare zvikamu zvisingafaniri kubviswa.Saizvozvo, pliers uye brute force inodiwa.Chenjerera kuti usakuvadza chero chinhu chinoonekwa kubva kunze.
Iyo lens ndechimwe chezvinhu zvinonyengera kubvisa.Kunze kwekuboora gomba mugirazi/purasitiki nekuiburitsa kunze, handina kufunga nezvedzimwe mhinduro dziri nyore.Ini ndinoda kuchengetedza kutaridzika kwelenzi zvakanyanya sezvinobvira kuitira kuti vanhu vasatomboona diki Raspberry Pi kamera pakati pemhete nhema uko lens yakagadziriswa kare.
Muvhidhiyo yangu, ndakaratidza yekutanga uye mushure mekuenzanisa kwePolaroid mafoto, saka iwe unogona kuona chaizvo zvaunoda kudzima kubva kamera.Chenjerera kuve nechokwadi chekuti pani yekumberi inogona kuvhurwa uye kuvharwa nyore.Funga nezvepaneru sechishongo.Muzviitiko zvakawanda, ichagadziriswa munzvimbo, asi kana iwe uchida kubatanidza iyo Raspberry Pi kune yekutarisa uye keyboard, unogona kubvisa iyo yekumberi pani uye plug mune yemagetsi sosi.Iwe unogona kupa yako mhinduro pano, asi ini ndafunga kushandisa magineti senzira yekubata mapaneru panzvimbo.Velcro inoita seisina kusimba.Makururu akawandisa.Uyu mufananidzo une animated unoratidza kamera kuvhura nekuvhara mapaneru:
Ini ndakasarudza iyo yakazara Raspberry Pi 4 Model B pane iyo diki Pi Zero.Ichi chikamu chekuwedzera kumhanya uye chikamu nekuti ini ndiri mutsva kumunda weRaspberry Pi, saka ndinonzwa ndakasununguka kuishandisa.Zviripachena, iyo diki Pi Zero ichatamba mamwe mabhenefiti munzvimbo yakamanikana yePolaroid.Sumo yeRaspberry Pi inodarika chiyero chedzidziso iyi, asi kana iwe uri mutsva kuRaspberry Pi, pane zvakawanda zviwanikwa zviripo pano.
Kurudziro huru ndeyekutora nguva uye uve nemoyo murefu.Kana iwe uchibva kuMac kana PC kumashure, saka iwe unozoda imwe nguva yekujaira iwe nema nuances ePi.Iwe unofanirwa kujaira kumutsara wekuraira uye hunyanzvi humwe Python coding hunyanzvi.Kana izvi zvichiita kuti unzwe kutya (Ndakatya pakutanga!), Ndapota usatsamwa.Chero bedzi iwe uchiigamuchira nekutsungirira uye nemoyo murefu, iwe uchaiwana.Kutsvaga paInternet nekushingirira kunogona kukunda zvinenge zvipingaidzo zvese zvaunosangana nazvo.
Mufananidzo uri pamusoro unoratidza kwakaiswa Raspberry Pi muPolaroid kamera.Iwe unogona kuona nzvimbo yekubatanidza yemagetsi ekupa kuruboshwe.Ziva zvakare kuti grey division line rinowedzera nehupamhi hwekuvhura.Chaizvoizvo, izvi kuita kuti printa isamire pairi uye iparadzanise iyo Pi kubva kuprinta.Paunenge uchipinza printer, unofanirwa kuchenjerera kuti usatyora pini yakanongedzwa nepenzura mumufananidzo.Iyo tambo yekuratidzira inobatanidza nemapini pano, uye kupera kwewaya kunouya nechiratidziro kunenge kota yema inch pakureba.Ndaifanira kutambanudza migumo yetambo zvishoma kuitira kuti printer irege kudzvanya paari.
Iyo Raspberry Pi inofanirwa kuiswa kuitira kuti rutivi rwune USB chiteshi chinonongedza kumberi.Izvi zvinobvumira iyo USB controller kuti ibatanidzwe kubva kumberi uchishandisa L-yakaita adapta.Kunyangwe ichi chaive chisiri chikamu chehurongwa hwangu hwepakutanga, ini ndichiri kushandisa diki HDMI tambo kumberi.Izvi zvinonditendera kuti ndiburitse zviri nyore kunze kwepaneru uye wobva wavhara iyo yekutarisa uye keyboard muPi.
Iyo kamera ndeye Raspberry Pi V2 module.Hunhu hauna kunaka senge itsva HQ kamera, asi isu hatina nzvimbo yakakwana.Iyo kamera yakabatana neRaspberry Pi kuburikidza neribhoni.Cheka gomba rakatetepa pasi pe lens iyo ribhoni inogona kupfuura.Ribhoni inoda kumonyororwa mukati isati yabatana neRaspberry Pi.
Iyo yepamberi yePolaroid ine nzvimbo yakati sandara, iyo yakakodzera kukwirisa kamera.Kuiisa, ndakashandisa kaviri-mativi tepi.Iwe unofanirwa kuchenjerera kumashure nekuti kune mamwe emagetsi zvikamu pabhodhi kamera zvausingade kukuvadza.Ndakashandisa zvimwe zvidimbu zvematepi se spacers kudzivirira zvikamu izvi kuti zvisapwanyika.
Pane mamwe mapoinzi maviri ekuona mumufananidzo uri pamusoro, unogona kuona nzira yekuwana iyo USB uye HDMI ports.Ndakashandisa L-yakaita USB adapta kunongedza kubatana kurudyi.Kune tambo yeHDMI mukona yekuruboshwe, ndakashandisa 6-inch tambo yekuwedzera ine L-yakaita yekubatanidza kune imwe mugumo.Unogona kuona izvi zvirinani muvhidhiyo yangu.
E Ink inoita seyakanaka sarudzo yemonitor nekuti mufananidzo wacho wakafanana nemufananidzo wakadhindwa papepa rerisiti.Ndakashandisa Waveshare 4.2-inch electronic ink display module ine 400 × 300 pixels.
Ingi yemagetsi ine analogi yemhando yandakangofarira.Zvinoita sepepa.Zvinonyatsogutsa kuratidza mifananidzo pachiratidziro pasina simba.Nekuti hapana chiedza chekusimbisa mapixels, kana mufananidzo wacho wagadzirwa, unoramba uri pachiratidziri.Izvi zvinoreva kuti kunyange kana pasina simba, mufananidzo wacho unoramba uri kumashure kwePolaroid, izvo zvinondiyeuchidza kuti mufananidzo wekupedzisira wandakatora waiva chii.Kutaura chokwadi, nguva yekuti kamera iiswe pasherufu yangu yemabhuku yakarebesa kupfuura painoshandiswa, zvekuti chero kamera isingashandiswe, kamera inenge yava foto furemu, inova sarudzo yakanaka.Kuchengetedza magetsi hakuna kukosha.Kusiyana nemwenje-yakavakirwa kuratidza iyo inogara ichidya simba, E Ink inongopedza simba kana ichida kudhirowazve.
Electronic inki kuratidza anewo zvayakaipira.Chinhu chikuru ndechekumhanya.Kuenzaniswa nemwenje-yakavakirwa kuratidza, zvinongotora nguva yakareba kuvhura kana kudzima pixel yega yega.Chimwe chinokanganisa ndechekuzorodza skrini.Iyo inodhura E Ink yekutarisa inogona kuzorodzwa zvishoma, asi iyo yakachipa modhi inodhirowa iyo skrini yese pese panoitika shanduko.Mhedzisiro yacho ndeyekuti iyo skrini inova nhema uye chena, uye ipapo mufananidzo wacho unooneka wakatarisa pasi mufananidzo mutsva usati waoneka.Zvinongotora sekondi imwe chete kupenya, asi wedzera.Zvese mune zvese, zvinotora anenge 3 masekonzi kuti ichi chidzitiro chigadzirise kubva panguva iyo bhatani rinodzvanywa kusvika painobuda mufananidzo pachiratidziri.
Chimwe chinhu chekuchengeta mupfungwa ndechekuti, kusiyana nemakomputa anoratidza anoratidza desktops nemakonzo, iwe unofanirwa kuve wakasiyana ne e-ink kuratidza.Chaizvoizvo, uri kuudza iyo yekutarisa kuti iratidze zvirimo pixel imwe panguva.Mune mamwe mazwi, iyi haisi plug uye kutamba, unoda imwe kodhi kuti uite izvi.Pese painotorwa mufananidzo, basa rekudhirowa mufananidzo pamonitor rinoitwa.
Waveshare inopa madhiraivha ezviratidziro zvayo, asi zvinyorwa zvayo zvinotyisa.Ronga kupedza nguva uchirwa nemonitor isati yashanda nemazvo.Aya ndiwo magwaro echidzitiro chandinoshandisa.
Chiratidziro chine waya 8, uye iwe uchabatanidza waya idzi kumapini eRaspberry Pi.Kazhinji, iwe unogona kushandisa chete tambo inouya nekutarisa, asi sezvo isu tiri kushanda munzvimbo yakamanikana, ndinofanira kuwedzera kuguma kwetambo kwete zvakanyanya.Izvi zvinochengetedza chikamu chimwe muzvina cheinch yenzvimbo.Ini ndinofunga imwe mhinduro ndeyekucheka mamwe epurasitiki kubva kune risiti printer.
Kuti ubatanidze chiratidziro kumashure kwePolaroid, iwe uchachera maburi mana.Monitor ine maburi ekuisa mumakona.Isa chiratidziro panzvimbo yaunoda, ita chokwadi chekusiya nzvimbo iri pazasi kuratidza bepa rerisiti, wozomaka nekuboora maburi mana.Zvadaro simbisa chidzitiro kubva kumashure.Pachave ne 1/4 inch gap pakati pekuseri kwePolaroid uye kumashure kwemonitor.
Iwe unogona kufunga kuti iyo yemagetsi inki kuratidza inonetsa kupfuura iyo yakakosha.Unogona kunge wakarurama.Kana iwe uchitsvaga sarudzo iri nyore, ungangoda kutsvaga diki remavara rekutarisa rinogona kubatanidzwa kuburikidza neHDMI port.Izvo zvakashata ndezvekuti iwe unogara uchitarisa padesktop yeRaspberry Pi inoshanda sisitimu, asi chakanakira ndechekuti iwe unokwanisa plug mukati nekuishandisa.
Ungangoda kuongorora kuti printa yerisiti inoshanda sei.Havashandisi inki.Pane kudaro, maprinta aya anoshandisa bepa rinopisa.Ini handina chokwadi zvachose kuti bepa rakagadzirwa sei, asi unogona kufunga nezvaro sedhirowa nekupisa.Kana kupisa kwasvika 270 madhigirii Fahrenheit, nzvimbo dema dzinogadzirwa.Kana bepa rakapetwa richizopisa zvakakwana, rinoshanduka kuva dema zvachose.Kunyanya kunobatsira pano ndeyekuti hapana chikonzero chekushandisa inki, uye kana ichienzaniswa nefirimu chaiyo yePolaroid, hapana maitiro emakemikari akaoma anodiwa.
Panewo kuipa kwekushandisa pepa rinopisa.Zviri pachena, iwe unogona kushanda chete mutema nemuchena, pasina ruvara.Kunyangwe mune yakasviba uye machena, hapana mimvuri yegrey.Iwe unofanirwa kudhirowa mufananidzo zvachose nemadotsi matema.Paunoyedza kuwana hunhu hwakanyanya sezvinobvira kubva pamapoinzi aya, unozowira mudambudziko rekunzwisisa jitter.Kunyanya kutarisisa kunofanirwa kubhadharwa kune iyo Floyd-Steinberg algorithm.Ndichakurega uchifamba uchibvisa tsuro iyo wega.
Paunoyedza kushandisa akasiyana siyana marongero uye dithering matekiniki, iwe unozosangana nemitsetse yakareba yemifananidzo.Ichi chikamu cheakawanda ma selfies andakakudza mune yakanakira mufananidzo kubuda.
Ini pachangu, ndinoda kutaridzika kwemifananidzo yakasvibiswa.Pavakatidzidzisa kupenda kuburikidza nestippling, zvakandiyeuchidza nezvekirasi yangu yekutanga yemifananidzo.Chitarisiko chakasiyana, asi chakasiyana nekutsetseka kwekutora mifananidzo kwevatema nechena kwatakadzidziswa kukoshesa.Ndinotaura izvi nekuti kamera iyi inotsauka kubva kutsika uye iyo yakasarudzika mifananidzo yainoburitsa inofanirwa kutorwa se "basa" rekamera, kwete "bug".Kana isu tichida iyo yekutanga mufananidzo, tinogona kushandisa chero imwe yevatengi kamera pamusika uye kuchengetedza imwe mari panguva imwe chete.Pfungwa apa ndeyekuita chimwe chinhu chakasiyana.
Zvino zvawanzwisisa kudhindwa kwemafuta, ngatitaure nezve maprinta.Printer receipt yandakashandisa yakatengwa kubva kuAdafruit.Ndakatenga yavo "Mini Thermal Receipt Printer Starter Pack", asi unogona kuitenga zvakasiyana kana zvichidikanwa.Muchiono, haufanire kutenga bhatiri, asi ungangoda adapta yemagetsi kuitira kuti ugoiisa mumadziro panguva yekuyedzwa.Chimwe chinhu chakanaka ndechekuti Adafruit ine yakanaka tutorials iyo inokupa iwe chivimbo chekuti zvese zvichaenda zvakajairwa.Tanga kubva pane izvi.
Ndinovimba kuti printer inogona kukwana Polaroid pasina shanduko.Asi yakakurisa, saka uchafanirwa kuchekerera kamera kana kudimburira printer.Ndakasarudza kukwenenzvera printa nekuti chikamu chekukwezva kwepurojekiti yaive yekuchengetedza chitarisiko chePolaroid zvakanyanya sezvinobvira.Adafruit inotengesawo maprinta erisiti asina casing.Izvi zvinochengetedza imwe nzvimbo uye madhora mashoma, uye zvino sezvo ndava kuziva kuti zvinhu zvose zvinoshanda sei, ndinogona kushandisa iyo nguva inotevera pandinovaka chimwe chinhu chakadai.Nekudaro, izvi zvichaunza dambudziko idzva, iro nzira yekuziva kubata bepa roll.Zvirongwa zvakaita seizvi ndezvekukanganisa uye matambudziko ekusarudza kugadzirisa.Iwe unogona kuona pazasi pefoto kona inoda kutemwa kuti printer ikwane.Kucheka uku kunozodawo kuitika kudivi rekurudyi.Paunenge uchicheka, ndapota chenjera kudzivirira waya dzeprinta nemidziyo yemagetsi yemukati.
Rimwe dambudziko neAdafruit printers nderekuti mhando inosiyana zvichienderana nemagetsi sosi.Vanokurudzira kushandisa 5v magetsi.Inoshanda, kunyanya kune zvinyorwa-based printing.Dambudziko nderekuti paunodhinda chifananidzo, nzvimbo dema dzinoita kunge dzakajeka.Simba rinodiwa kupisa hupamhi hwese bepa rakakura zvakanyanya pane painodhinda zvinyorwa, saka nzvimbo nhema dzinogona kuita grey.Zvakaoma kunyunyuta, maprinta aya haana kugadzirwa kudhinda mafoto mushure mezvose.Printer haigone kuburitsa kupisa kwakakwana paupamhi hwebepa panguva.Ndakaedza dzimwe tambo dzemagetsi dzine zvinobuda zvakasiyana, asi handina kubudirira zvakanyanya.Chekupedzisira, chero zvazvingava, ndinofanira kushandisa mabhatiri kuti ndiise simba, saka ndakarega kuedza kwetambo yemagetsi.Ndisingatarisiri, iyo 7.4V 850mAh Li-PO rechargeable bhatiri yandakasarudza yakaita kudhinda kwese kwesimba masosi andakaedza yakasviba.
Mushure mekuisa printa mukamera, cheka gomba pasi pemonitor kuti uenderane nebepa rinobuda muprinta.Kucheka bepa rerisiti, ndaishandisa blade yechembere yekurongedza tepi.
Kuwedzera kune yakasviba kubuda kwemavara, imwe yakashata ndeye banding.Pese apo printer inomira kubata nedata iri kudyiswa, inosiya kamukana kadiki kana yatanga kudhinda zvakare.Mune dzidziso, kana iwe uchigona kubvisa iyo buffer uye kurega iyo data ichiyerera ichienderera ichidyisa muprinta, unogona kudzivirira gaka iri.Zvechokwadi, iyi inoratidzika kuva sarudzo.Webhusaiti yeAdafruit inotaura zvisina kunyorwa pushpins paprinta, iyo inogona kushandiswa kuchengetedza zvinhu mukuwirirana.Izvi handisati ndazviyedza nekuti handizive kuti zvinoshanda sei.Kana iwe ukagadzirisa dambudziko iri, ndapota igovera kubudirira kwako neni.Iyi ndeimwe batch ye selfies kwaunogona kuona zvakajeka mabhendi.
Zvinotora masekonzi makumi matatu kudhinda mufananidzo.Iyi vhidhiyo yeprinta iri kushanda, saka unogona kunzwa kuti zvinotora nguva yakareba sei kudhinda mufananidzo.Ini ndinotenda kuti mamiriro aya anogona kuwedzera kana Adafruit hacks akashandiswa.Ini ndinofungidzira kuti nguva pakati pekudhinda inonokerwa zvemazvirokwazvo, izvo zvinotadzisa printa kudarika kumhanya kwe data buffer.Ndinotaura izvi nekuti ndakaverenga kuti pepa repamberi rinofanira kuwiriraniswa nemusoro weprinta.Ndinogona kunge ndisina kururama.
Sezvakangoita E-inki kuratidza, zvinoda kushivirira kuita kuti printa ishande.Pasina mutyairi wekudhinda, uri kunyatso shandisa kodhi kutumira data zvakananga kuprinta.Saizvozvo, iyo yakanakisa sosi inogona kunge iri Adafruit's webhusaiti.Iyo kodhi mune yangu GitHub repository inogadziriswa kubva kumienzaniso yavo, saka kana ukasangana nekuomerwa, zvinyorwa zveAdafruit zvichave sarudzo yako yakanaka.
Pamusoro peiyo nostalgic uye retro mabhenefiti, mukana weSNES controller ndeyekuti inondipa humwe hutongi hwandisingafaniri kufunga zvakanyanya nezvahwo.Ini ndinofanira kuisa pfungwa pakutora kamera, printa, uye kutarisa kuti zvishande pamwe chete, uye kuve neagara aripo anogona kukurumidza mepu mabasa angu kuti zvinhu zvive nyore.Uye zvakare, ini ndatove neruzivo rwekushandisa yangu Coffee Stirrer Camera controller, saka ndinogona kutanga nyore.
Iyo reverse controller yakabatana kuburikidza ne USB tambo.Kuti utore mufananidzo, tinya bhatani reA.Kudhinda mufananidzo, dzvanya bhatani B.Kuti udzime mufananidzo, tinya bhatani X.Kuti ndibvise chiratidziro, ndinogona kudzvanya bhatani Y.Handina kushandisa mabhatani ekutanga/kusarudza kana mabhatani ekuruboshwe/kurudyi kumusoro, saka kana ndiine mazano matsva mune ramangwana, anogona kushandiswa kune zvitsva.
Kana ari mabhatani emiseve, mabhatani ekuruboshwe nekurudyi ekiyipadhi anotenderera mumifananidzo yese yandakatora.Kudzvanya kumusoro hakuiti chero oparesheni.Kudzvanya kuchaendesa mberi bepa rerisiti printer.Izvi zviri nyore kwazvo mushure mekudhinda mufananidzo, ndinoda kupfira bepa rakawanda ndisati ndabvarura.Kuziva kuti printer uye Raspberry Pi vari kutaurirana, iyi zvakare inokurumidza bvunzo.Ndakadzvanya, uye pandakanzwa kudyiswa kwepepa, ndakaziva kuti bhatiri romupurinda rakanga richiri kuchaja uye ragadzirira kushandisa.
Ndakashandisa mabhatiri maviri mukamera.Imwe inopa simba Raspberry Pi uye imwe inopa simba printer.Muchidzidzo, mese munogona kumhanya nemagetsi akafanana, asi handifunge kuti mune simba rakakwana rekumhanyisa printer zvizere.
Kune Raspberry Pi, ndakatenga bhatiri diki randaigona kuwana.Kugara pasi pePolaroid, mazhinji acho akavanzwa.Ini handifarire chokwadi chekuti tambo yemagetsi inofanira kubva kumberi kuenda kugomba isati yabatana neRaspberry Pi.Pamwe unogona kuwana nzira yekusvina imwe bhatiri muPolaroid, asi hapana nzvimbo yakawanda.Izvo zvakashata zvekuisa bhatiri mukati ndezvekuti iwe unofanirwa kuvhura chivharo chekumashure kuti uvhure nekuvhara mudziyo.Ingo bvisa bhatiri kuti udzime kamera, inova sarudzo yakanaka.
Ndakashandisa tambo ye USB ine on/off switch kubva kuCanaKit.Ndinogona kunge ndakanyanya kunaka kune iyi pfungwa.Ini ndinofunga iyo Raspberry Pi inogona kuvhurwa nekudzimwa nebhatani iri chete.Muchokwadi, kubvisa USB kubva mubhatiri kuri nyore.
Kune printer, ndakashandisa 850mAh Li-PO rechargeable bhatiri.Bhatiri rakaita seiri rine waya mbiri dziri kubuda mariri.Imwe ndiyo inobuda uye imwe ndiyo ichaja.Kuti ndiwane "kukurumidza kubatana" pane zvakabuda, ndaifanira kutsiva chinongedzo neyakajairwa-chinangwa 3-waya yekubatanidza.Izvi zvinodikanwa nekuti ini handidi kuti ndibvise printa yese pese pandinenge ndichida kubvisa simba.Zvingave nani kuchinja pano, uye ndinogona kuzvivandudza mune ramangwana.Kunyangwe zvirinani, kana switch iri kunze kwekamera, ipapo ini ndinogona kuburitsa printer pasina kuvhura gonhi rekumashure.
Bhatiri riri kuseri kweprinta, uye ndakaburitsa tambo panze kuti ndigone kubatana uye kubvisa simba sezvinodiwa.Kuti uchajise bhatiri, USB yekubatanidza inopiwa zvakare kuburikidza nebhatiri.Ini zvakare ndakatsanangura izvi muvhidhiyo, saka kana iwe uchida kunzwisisa kuti zvinoshanda sei, ndapota zvitarise.Sezvandakataura, bhenefiti inokatyamadza ndeyekuti kuseta uku kunoburitsa zvirinani kudhinda zvichienzaniswa nekubatanidza zvakananga kumadziro.
Apa ndipo pandinofanira kupa disclaimer.Ndinogona kunyora Python inoshanda, asi handikwanise kutaura kuti yakanaka.Ehe, kune nzira dziri nani dzekuita izvi, uye varinani vanogadzira vanogona kuvandudza zvakanyanya kodhi yangu.Asi sezvandataura, zvinoshanda.Naizvozvo, ini ndichagovera yangu GitHub repository newe, asi ini handikwanise kupa rutsigiro.Ndinovimba izvi zvakakwana kukuratidza zvandiri kuita uye unogona kuzvivandudza.Govera kuvandudzwa kwako neni, ini ndichafara kugadzirisa kodhi yangu uye kukupa chikwereti.
Naizvozvo, zvinofungidzirwa kuti wakamisa kamera, tarisisa uye printa, uye inogona kushanda zvakajairika.Iye zvino unogona kumhanya script yangu yePython inonzi "digital-polaroid-camera.py".Pakupedzisira, iwe unofanirwa kuseta iyo Raspberry Pi kuti iite otomatiki iyi script pakutanga, asi ikozvino, unogona kuimhanyisa kubva kuPython mupepeti kana terminal.Zvinotevera zvichaitika:
Ndakaedza kuwedzera makomendi kune kodhi kuti nditsanangure zvakaitika, asi chimwe chinhu chakaitika ndichiri kutora mufananidzo uye ndinoda kutsanangura zvimwe.Kana iyo foto yatorwa, izere-ruvara, yakazara saizi mufananidzo.Mufananidzo wacho unochengetwa mufolda.Izvi zvakanakira nekuti kana iwe uchizoda kuishandisa gare gare, iwe unenge uine yakajairika yakakwirira-resolution foto.Mune mamwe mazwi, kamera ichiri kugadzira yakajairika JPG semamwe makamera edhijitari.
Kana mufananidzo wacho watorwa, chifananidzo chechipiri chichagadzirwa, chinogadziriswa kuti chionekwe uye chidhindwe.Uchishandisa ImageMagick, unogona kugadziridza foto yekutanga uye woishandura kuita dema nechena, wobva waisa Floyd Steinberg dithering.Ini ndinogonawo kuwedzera mutsauko mudanho iri, kunyangwe chimiro ichi chakadzimwa nekusarudzika.
Mufananidzo mutsva wakachengetedzwa kaviri.Kutanga, chengetedza seyakasviba uye chena jpg kuitira kuti ionekwe uye ishandiswe zvakare gare gare.Chechipiri chekuchengetedza chichagadzira faira ine .py yekuwedzera.Iri harisi faira remufananidzo rakajairwa, asi kodhi inotora ruzivo rwepixel rwese kubva pamufananidzo uye ichishandura kuita data rinogona kutumirwa kumudhinda.Sezvandakataura muchikamu cheprinta, danho iri rinodikanwa nekuti hapana mutyairi wekudhinda, saka haugone kungotumira mifananidzo yakajairika kune anodhinda.
Kana bhatani rikadzvanywa uye mufananidzo wakadhindwa, kune zvakare mamwe mabhipi makodhi.Izvi ndezvekusarudza, asi zvakanaka kuwana mhinduro inonzwika kuti uzive kuti pane chiri kuitika.
Nguva yekupedzisira, handina kukwanisa kutsigira iyi kodhi, ndeyekunongedza iwe munzira kwayo.Ndapota ishandise, igadzirise, ivandudze uye uzviite iwe pachako.
Ichi chirongwa chinonakidza.Mukutarisa, ndichaita chimwe chinhu chakasiyana kana kuti zvimwe ndichachigadzirisa mune ramangwana.Yokutanga ndiyo controller.Kunyangwe iyo SNES controller ichigona kuita chaizvo zvandinoda kuita, iri mhinduro yakaoma.Waya yakavharwa.Zvinokumanikidza kubata kamera mune rumwe ruoko uye controller mune rimwe.Saka zvinonyadzisa.Imwe mhinduro inogona kunge iri yekupenyura mabhatani kubva kune controller uye nekuabatanidza zvakananga kune kamera.Nekudaro, kana ndichida kugadzirisa dambudziko iri, ndinogona kusiya SNES zvachose uye kushandisa mamwe mabhatani echinyakare.
Chimwe chinokanganisa kamera ndechekuti pese painobatidzwa kana kudzima kamera, chivharo chekumashure chinoda kuvhurwa kuti ubvise printer kubva mubhatiri.Zvinoita sekuti iyi inyaya diki, asi pese pese rutivi rwekumashure rwunovhurwa nekuvharwa, bepa rinofanirwa kupfuudzwa zvakare nekuvhura.Izvi zvinopedza rimwe bepa uye zvinotora nguva.Ndinogona kufambisa waya uye waya dzekubatanidza kunze, asi ini handidi kuti zvinhu izvi zviburitswe pachena.Mhinduro yakanaka ndeye kushandisa on / off switch iyo inogona kudzora printer uye Pi, iyo inogona kuwanikwa kubva kunze.Zvinogona zvakare kukwanisa kuwana printa charger port kubva kumberi kwekamera.Kana uri kutarisana neprojekti iyi, ndapota funga kugadzirisa dambudziko iri uye ugovane pfungwa dzako neni.
Chinhu chekupedzisira chekusimudzira iprinta yerisiti.Printer yandinoshandisa yakanakira kudhindwa kwemavara, asi kwete yemifananidzo.Ndanga ndichitsvaga yakanakisa sarudzo yekusimudzira yangu yemafuta risiti printer, uye ndinofunga ndazviwana.Bvunzo dzangu dzekutanga dzakaratidza kuti printa yerisiti inoenderana ne80mm ESC/POS inogona kuburitsa mibairo yakanaka.Dambudziko nderekutsvaga bhatiri diki uye rine simba rebhatiri.Ichi chichava chikamu chakakosha chepurojekiti yangu inotevera kamera, ndapota ramba uchiteerera kune mazano angu emakamera ekudhinda anopisa.
PS: Ichi chinyorwa chakareba kwazvo, ndine chokwadi chekuti ndakapotsa zvimwe zvakakosha.Sezvo kamera ichave yakagadziridzwa zvisingaite, ndichaigadzirisa zvakare.Ndinovimba kuti unofarira nyaya iyi.Usakanganwe kunditevera (@ade3) pa Instagram kuti uteedzere iyi foto uye mamwe angu ekutora mafoto adventures.Iva akagadzira.
Nezve munyori: Adrian Hanft mutori wemifananidzo uye kamera anofarira, mugadziri, uye munyori we "Mushandisi Zero: Mukati meChishandiso" (Mushandisi Zero: Mukati meChishandiso).Maonero aburitswa muchinyorwa chino ndeemunyori chete.Unogona kuwana mamwe mabasa uye mabasa eHanft pane yake webhusaiti, blog uye Instagram.Chinyorwa ichi chakatsikiswawo pano.
Nguva yekutumira: Chivabvu-04-2021