Umshicileli omncinci wobushushu obungenazingcingo ufumana ilayibrari yeArduino (kunye nesicelo seMacOS)

[Larry Bank] Ithala leencwadi leArduino lokushicilela okubhaliweyo kunye nemizobo kwi-BLE (Bluetooth Low Energy) umshicileli oshushu uneempawu ezibalaseleyo kwaye unokuthumela imisebenzi yoshicilelo engenazingcingo kwiimodeli ezininzi eziqhelekileyo ngokulula kangangoko.Ezi zishicileli zincinci, azibizi, kwaye zingenazingcingo.Olu ludibaniso oluhle olubenza babe nomtsalane kwiiprojekthi ezinokuzuza ngokuprinta iikopi ezinzima.
Kananjalo ayiphelelanga kumbhalo olula omiselweyo.Ungasebenzisa i-Adafruit_GFX iifonti zesitayile sethala leencwadi kunye nokhetho lokugqiba iziphumo eziphucukileyo, kunye nokuthumela umbhalo ofomathiweyo njengemizobo.Unokufunda lonke ulwazi malunga nento enokwenziwa lithala leencwadi kolu luhlu lufutshane lwemisebenzi.
Kodwa [uLarry] akazange aphelele apho.Ngelixa elinga ngemicrocontrollers kunye neBLE abashicileli abashushu, wayefuna ukujonga ngokuthe ngqo ukusebenzisa iBLE ukuthetha naba bashicileli kwiMac yakhe.Print2BLE sisicelo seMacOS esikuvumela ukuba urhuqe iifayile zemifanekiso kwifestile yesicelo.Ukuba isiphumo sokujonga kwangaphambili silungile, iqhosha loshicilelo liyakwenza ukuba liphume kumshicileli njengomfanekiso odiyiweyo we-1-bpp.
Abashicileli abancinci be-thermal bafanelekile kwiiprojekthi ezicocekileyo, ezinjengeekhamera zePolaroid ezilungisiweyo.Ngoku aba bashicileli bancinci abanazingcingo kwaye banoqoqosho.Kuphela kungoncedo lwethala leencwadi apho izinto ziya kuba lula.Ewe, ukuba konke oku kubonakala kulula kakhulu, ungasebenzisa iplasma ukubeka ushicilelo lwe-thermal umva kushicilelo lwe-thermal nangaliphi na ixesha.
Ndikhangela indawo yokugcina, ndizibuza ukuba kukho nabani na owaziyo ngabashicileli baxabiso liphantsi, oko kukuthi, Phomemo M02, M02s, kunye ne M02pro azidweliswanga njengezihambelanayo, kodwa zikhangela ikati, ihagu kunye nabanye abashicileli, zingafana kakhulu okanye ngaphantsi. indlela esisiseko?Ufuna ukwazi ukuba iyasebenza na kwithala leencwadi.Enye indawo yokugcina kwi-github yezikripthi ze-phomemo python zokushicilela kwilinux.Ezi zinto zitshiphu kwaye zipholile ukudlala.Ufuna ukwazi ukuba kutheni ingakhange ifumane ukutsalwa ngakumbi.
Kukho iinguqulelo ezininzi zeBLE abashicileli.Ngaphakathi, bonke banokuba ne-printhead efanayo kunye ne-UART interface, kodwa iinkampani ezongeza iibhodi ze-BLE zithanda ukutshintsha izinto ukwenza kube nzima ukusebenzisa ngaphandle kwezicelo zabo.Abashicileli ababini endibaxhasayo kufuneka babuyiselwe umva ngobunjineli ngezicelo zabo ze-Android kuba abaxhasi i-ESC/POS yomyalelo omiselweyo.I-GOOJPRT iziphatha ngokuchanekileyo kwaye ithumela kuphela imiyalelo esemgangathweni nge-BLE.Ndiyakrokrela ukuba abantu abaninzi "abangaqhelekanga" bathatha isigqibo sokusebenzisa iiprothokholi zonxibelelwano ukukunyanzela ukuba usebenzise ii -apps zabo eziphathwayo.
Ngoko ke, ukuba ndithenga enye yazo kwaye ndiyikhuphe kwaye ndikhuphe indawo ye-BLE, ngoko kunokwenzeka ukuba ube nomshicileli oshushu we-UART kuphela?
Bendidlala ne-Amazon's 80mm NETUM iprinta engenazingcingo/etshajwayo.Ixabisa i-80 yeedola kwaye iboniswa kwi-serial com port.Ixhasa i-ESC/POS, ndiye ndabhala eyam ilayibrari yePowerShell yemifanekiso.Okukuphela kokungalunganga kweNETUM kukuba ayinaso umthamo wemiqulu emikhulu kakhulu yomshicileli, kodwa eli lixabiso lokudibanisa.Ndifumanise ukuba ndingathatha iiroli ezinobungakanani obuphakathi kwaye ndikhuphe isiqingatha sazo kwi-spool engenanto.Kuthatha imizuzu engaphantsi kwemihlanu, nto leyo engeyiyo ingxaki enkulu ngokwesantya endisisebenzisa ngaso.
Impendulo emfutshane-ewe!IBluetooth Low Energy (BLE) iyahambelana kakhulu kumaqonga ahlukeneyo, ngoko ke ukuyiphumeza kwiLinux akuyi kwenza mahluko mninzi.
Kumbhalo onokubalekayo, iilayini ezilula, kunye neekhowudi zebhakhowudi, akukho baqhubi banzima bayafuneka, kuba phantse zonke iileyibhile eziqhelekileyo/iirisithi zerisithi zixhasa ikhowudi esezantsi yomshicileli we Epson, eyaziwa ngokuba yi ESC/P.[1] Ukuchaneka ngakumbi, ileyibhile/irisithi yerisithi yomshicileli we-thermal sebenzisa i ESC/POS (Epson Standard Code/Point of Sale) ukwahluka.[2] Igama elithi ESC/P okanye ESC/POS likwafanelekile kuba kukho unobumba we-ESCape (ikhowudi ye-ASCII 27) phambi komyalelo womshicileli.
Ushicilelo olulula olulula lwenjongo eshushu yobushushu/iirisithi zinokuthengwa ngexabiso eliphantsi kwiiwebhusayithi ezifana ne-AliExpress.[3] Abashicileli benjongo-jikelele bane-RS-232 UART TTL ujongano lomgangatho oxhasa ESC/POS.Ujongano lwenqanaba le-RS-232 UART TTL lunokuguqulwa ngokulula kwi-USB usebenzisa i-UART/USB bridge chip (efana ne-CH340x) okanye intambo.Kwi-WiFi kunye ne-BLE uqhagamshelo olungenazingcingo, udinga kuphela ukudibanisa imodyuli efana nemodyuli ye-Espressif ESP32 kwi-interface ye-UART TTL.[4] Okanye yongeza i-10-15 yeedola zase-US kwixabiso leleyibhile jikelele ye-thermal/irisithi abashicileli, kwaye izakubonelela ngqo nge-USB/WiFi/BLE.Kodwa kuphi ubumnandi kule nto?
Xa ufuna ukuqhubekekisa umfanekiso (zoom/dither/black-and-white conversion) kwaye uwuthumele kumshicileli weleyibhile, umqhubi onzima uya kudlala.Kwi-Windows, umqhubi unikezelwa kwi-intanethi, khangela "i-Windows thermal label printer driver" ngaphandle kwe "s".Kungumceli mngeni kubalawuli abancinci abasebenzisa iileyibhile jikelele/iirisithi zoshicilelo ukuprinta iifoto, kwaye leyo yi [Larry Bank] ye Arduino yelayibrari ibonakala ithathwa isiwe kwinqanaba elilandelayo.
3. Goojprt Qr203 58 mm micro embedded thermal umshicileli Rs232+Ttl panel ehambelana Eml203, esetyenziselwa risithi ibhakhowudi US $15.17 + US $2.67 Ukuthumela:
4. Imodyuli engenacingo yeNodeMcu V3 V2 Lua WIFI ibhodi yophuhliso ESP8266 ESP32 ene-antenna ye-PCB kunye ne-USB port ESP-12E CP2102 USD 2.94 + USD 0.82 Imali yokuthumela:
Iphepha elisetyenziswa ngabashicileli linxulumene nenani elikhulu leengxaki zempilo.Ukongeza, ayiphinde isetyenziswe okanye ayinabungozi kokusingqongileyo nangayiphi na indlela.
Iqulethe isiphazamisi esinamandla se-endocrine i-bisphenol-a.Ngendlela, iimveliso ezingenayo i-BPA zihlala ziqulethe i-BPA-iteknoloji eyahlukileyo, kodwa i-endocrine ephazamisayo.
Nokuba zeziphi iikhemikhali ezicaphukisayo okanye hayi, iphepha le-thermal alikho ngokwendalo (ngokwengqiqo) enobuhlobo ngayo nayiphi na inkcazo.
Akunakwenzeka ukuba ujongane nenxalenye encinci yemali eyenziwe ngumgcini-mali.Kodwa kufanelekile ukukhankanya.
Ikhuthazwe sesi sithuba sikaHackaday ngu [Donald Papp], esi sithuba sikhomba kwithala leencwadi lika [Larry Bank] Arduino elinefoto eprintiweyo kubashicileli abashushu, [uJeff Epler] unenye entsha e-Adafruit (Septemba 2021) 28th)'BLE Thermal “ Isifundo Somshicileli weKati” ngeCircuitPython [1][2][3] Oku kubangele umsebenzi woshicilelo lwefoto oqhutywa yintwana entle (kodwa kunokuba iduru IMHO) Adafruit CLUE nRF52840 Express Thermal umshicileli onebhodi yeBluetooth LE kunye ne-1.3” 240×240 umbala IPS TFT ukubonisa ebhodini.[4]
Ngelishwa, ikhowudi yeCircuitPython iprinta kuphela umfanekiso owenziwe ngaphambili sisicelo sokuhlela ifoto (njengomthombo wasimahla kunye nomthombo ovulekileyo weqonga lomhleli wesithombe se-GIMP).[5] Kodwa ukuba nobulungisa, ndiyathandabuza ukuba ibhodi ye-CLUE ene-Nordic nRF52840 Bluetooth LE processor, i-1 MB imemori ye-flash, i-256KB RAM, kunye ne-64 MHz Cortex M4 iprosesa eqhuba i-CircuitPython epheleleyo inendawo yokulungisa nantoni na ngaphandle kokulula Umfanekiso- iplanga.
[UJeff Epler] wabhala: Xa ndabona umshicileli "wekati" kweli nqaku leHackaday (https://hackaday.com/2021/09/21/mini-wireless-thermal-printers-get-arduino-library -and-macos -app/), ndifuna nje ukuzilungiselela enye.Ipowusta yoqobo yenze ithala leencwadi leArduino, kodwa bendifuna ukwenza inguqulelo elungele iCircuitPython.
2. Isifundo se-Adafruit “BLE Thermal “Cat” Printer eneCircuitPython” isifundo [ifomathi ye-html yephepha elinye]

https://cdn-learn.adafruit.com/downloads/pdf/ble-thermal-cat-printer-with-circuitpython.pdf?timestamp=1632888339

Ngokusebenzisa iwebhusayithi yethu kunye neenkonzo, uvumelana ngokucacileyo nokubekwa kwenkqubo yethu, ukusebenza kunye neekuki zentengiso.Funda nzulu


Ixesha lokuposa: Oct-13-2021