Cov txheej txheem:

Pixel Khoom Siv MicroPython: Thawj Kauj Ruam: 7 Kauj Ruam
Pixel Khoom Siv MicroPython: Thawj Kauj Ruam: 7 Kauj Ruam

Video: Pixel Khoom Siv MicroPython: Thawj Kauj Ruam: 7 Kauj Ruam

Video: Pixel Khoom Siv MicroPython: Thawj Kauj Ruam: 7 Kauj Ruam
Video: ep:52.kawm hais lus nplog txog khoom siv ເຮືອນຄົວ 31 ມີນາ 2022 2024, Hlis ntuj nqeg
Anonim
Pixel Khoom Siv MicroPython: Thawj Kauj Ruam
Pixel Khoom Siv MicroPython: Thawj Kauj Ruam

Txoj kev mus qhib lub peev xwm ntawm Kano's Pixel pib nrog hloov lub Hoobkas tsim khoom nrog MicroPython tab sis qhov ntawd tsuas yog pib xwb.

Txhawm rau ua tus lej ntawm Pixel Kit peb yuav tsum txuas peb lub khoos phis tawj rau nws.

Phau ntawv qhia no yuav piav qhia tias lub vijtsam khau raj txhais li cas, nkag mus rau nplooj ntawv dav dav thiab yuav ua li cas txuas rau Pixel Kit.

Kauj Ruam 1: Kuaj Cov Khau

Image
Image
Khau raj cov ntxaij vab tshaus
Khau raj cov ntxaij vab tshaus
Khau raj cov ntxaij vab tshaus
Khau raj cov ntxaij vab tshaus

Thaum koj lub Pixel Kit khau looj plab hlaub nws qhia ob peb lub vijtsam los qhia rau koj paub tias nws ua dab tsi thiab nws lub xeev. Nov yog qhov lawv txhais li cas:

  • Txiv kab ntxwv: Sim txuas.
  • Xiav: Tsim nws tus kheej lub network wifi.
  • Ntsuab: Txuas nrog lub network wifi.
  • Liab: Sim txuas rau wifi network thiab ua tsis tiav.

Thaum Pixel Khoom tsim nws tus kheej lub network wifi, Nws yuav tsum muaj lub npe xws li PIXEL_KIT_XXXX tab sis nrog tus lej tsis yog XXXX.

Thawj zaug koj lub Pixel Kit khau looj plab hlaub nws ib txwm tso saib lub xiav xiav.

Qee zaum koj Cov Khoom Siv Pixel txuas nrog (lub vijtsam ntsuab) lossis tsim lub network wifi (lub vijtsam xiav), nws yuav tso nws tus IP chaw nyob hauv hom binary: Cov liab liab txhais tau tias 1, tsis muaj tus lej txhais 0.

Kauj ruam 2: Nkag mus rau Terminal Terminal

Nkag mus rau Terminal Terminal
Nkag mus rau Terminal Terminal

Xiav npo

Yog tias koj lub Pixel Kit khau raj rau lub vijtsam xiav, koj yuav pom qhib wifi network npe PIXEL_KIT_*NUMBERS*.

Txhawm rau qhib nplooj ntawv dav dav hauv koj tus browser, nco ntsoov tias koj tau txuas nrog Pixel Kit wifi network thiab mus rau https://192.168.4.1. Koj yuav pom nplooj ntawv ntawm cov duab. Txawm hais tias nws siv tau los ntawm qhov chaw nyob no, nws tau pom zoo kom nyem rau lub pob rub tawm thiab khaws nplooj ntawv no offline. Nws yuav ua haujlwm zoo ib yam tab sis nrawm dua!

Pixel Kit tus IP chaw nyob thaum pom lub vijtsam xiav yuav tsis hloov pauv: nws ib txwm yog

Ntsuab tshuaj ntsuam

Yog tias koj lub cuab yeej Pixel khau rau lub vijtsam ntsuab, nws yuav tso nws tus IP chaw nyob ntawm lub network nws txuas nrog. Peb yuav xav tias nws tau txuas nrog tib lub network zoo li koj lub khoos phis tawj tab sis yog tias nws tsis yog, txheeb xyuas cov kauj ruam kawg ntawm yuav ua li cas rov qab/rov txuas koj lub Pixel Kit.

Thaum koj paub tseeb tias koj lub khoos phis tawj thiab Pixel Kit tau txuas nrog tib lub network, mus rau nws tus IP chaw nyob kom nkag mus rau nplooj ntawv dav dav.

Kauj Ruam 3: Txuag Terminal Terminal rau Koj Lub Computer

Txuag Terminal Nplooj Ntawv rau Koj Lub Computer
Txuag Terminal Nplooj Ntawv rau Koj Lub Computer
Txuag Terminal Nplooj Ntawv rau Koj Lub Computer
Txuag Terminal Nplooj Ntawv rau Koj Lub Computer

Thaum koj nkag mus rau lub davhlau ya nyob twg los ntawm koj lub Pixel Kit ip, koj cov Khoom Pixel tau coj zoo li lub vev xaib: Nws tuav lub vev xaib uas koj tuaj yeem nkag rau ntawm koj tus browser. Txhua lub sijhawm koj thov lossis rov kho nplooj ntawv no, Cov Khoom Siv Pixel yuav tsum tso tseg txhua yam nws ua thiab teb cov lus thov no.

Thaum nws txaus Pixel Khoom tuaj yeem coj zoo li lub web server, nws tsis txhais tau tias yog lub web server thiab qee zaum nws tuaj yeem qeeb heev. Cov xov xwm zoo yog thaum koj tau rub tawm nplooj ntawv dav dav, koj tuaj yeem txuag nws offline!

Txhawm rau txuag lub davhlau ya nyob twg nplooj ntawv offline, nyem rau ntawm lub pob rub tawm ntawm lub sidebar. Nws yuav cia li khaws cov ntawv ntawm koj "Downloads" nplaub tshev tab sis koj tuaj yeem txav mus thiab hloov nws mus rau txhua qhov chaw koj xav tau.

Kauj ruam 4: Txuas rau Pixel Khoom

Txuas nrog Pixel Kit
Txuas nrog Pixel Kit
Txuas rau Pixel Khoom
Txuas rau Pixel Khoom
Txuas nrog Pixel Kit
Txuas nrog Pixel Kit

Nrog koj lub davhlau ya nyob twg nplooj qhib thiab tom qab koj ua kom ntseeg tau tias koj Cov Khoom Siv Pixel thiab lub khoos phis tawj nyob hauv tib lub network (txawm yog ib qho khoom siv Pixel tsim nws tus kheej lossis ib qho uas koj txuas nrog nws) thiab ntaus tus IP chaw nyob hauv hom binary lossis lej. Nws yuav zoo ib yam li no:

11000000101010000000010000000001

los yog

192.168.4.1

Yog tias koj xav paub yuav ua li cas hloov pauv tus lej binary hauv zauv, kos qhov txuas no:

Thaum txuas cov headers yuav tig ntsuab thiab koj yuav raug nthuav qhia rau Python REPL: Nyeem, Txheeb Xyuas, Sau thiab Loop. Yay!

Kauj ruam 5: Txuas mus rau Wifi Network

Txuas mus rau Wifi Network
Txuas mus rau Wifi Network

Thaum txuas nrog ntawm lub network tsim los ntawm Pixel Kit koj yuav tsis muaj kev siv internet.

Yog tias koj xav tau tus lej thiab muaj kev nkag tau mus rau internet tib lub sijhawm koj yuav tsum txuas lub Pixel Kit mus rau wifi network uas muaj internet. Lub khoos phis tawj koj yuav siv rau tus lej thiab koj Pixel Kit yuav tsum txuas nrog tib lub network.

Txoj hauv kev yooj yim tshaj plaws los txuas rau lub network wifi yog khiav "saveWifiConf (ssid, passord)" ntawm REPL qhov twg ssid yog lub npe ntawm lub network koj xav kom koj Cov Khoom Siv Pixel txuas thiab tus password yog tus password network:

saveWifiConf ('WifiName', 'Password')

Tom qab khiav "saveWifiConf (ssid, password)", koj yuav tsum tig koj lub Pixel Kit tawm thiab rov ua dua los thov hloov pauv.

Cov lus qhia Pro: Koj tuaj yeem rov pib dua koj cov khoom siv Pixel los ntawm nplooj ntawv dav dav los ntawm kev ntaus cov lus txib hauv qab no:

pib dua ()

Koj lub davhlau ya nyob twg yuav xoob kev sib txuas thaum koj rov pib dua koj lub Pixel Kit. Yog tias koj tau khaws koj lub vev xaib nplooj ntawv offline, tsuas yog rov kho nws thiab txuas rau tus ip tshiab tshwm ntawm lub vijtsam ntsuab (ib zaug koj lub khoos phis tawj txuas rau lub wifi koj nyuam qhuav txuas koj lub Pixel Kit rau).

Yog tias koj tsis tau khaws cov nplooj ntawv offline, hloov tus lej binary tso tawm los ntawm Pixel Kit rau hauv tus ip thiab nkag mus los ntawm koj tus browser.

Kauj Ruam 6: Rov Ua Haujlwm/Offline Hom

Image
Image

Txhua lub sijhawm, tig koj lub Pixel Cov Khoom Tawm thiab rov ua dua thaum tuav ob lub khawm liab kom maj mam quab yuam nws kom pom lub vijtsam xiav.

Qhov no muaj txiaj ntsig zoo hauv ob peb kis:

- Koj tau txuas nrog lub network wifi tsis raug, tus lej tsis raug, ntaus ntawv, thiab lwm yam … Hauv qhov no Pixel Cov Khoom Siv yuav khau raj rau lub vijtsam liab thiab yuam kom lub vijtsam xiav yog tib txoj hauv kev txuas dua mus rau Pixel Khoom.

- Lub wifi network koj txuas nrog tsis muaj ntxiv lawm. Qhov no tuaj yeem yog vim muaj teeb meem thev naus laus zis tab sis nws kuj tuaj yeem yog vim koj txuas nrog koj lub wifi hauv tsev thiab tam sim no koj nyob tom tsev kawm ntawv lossis phooj ywg qhov chaw. Nkag mus rau lub vijtsam xiav yuav tso cai rau koj txuas mus rau lub network wifi tshiab.

- Peb zoo li nyob hauv lub ntiaj teb txuas nrog tab sis kuv ntseeg tias peb yuav tsum tsis txhob vam khom lub network kom muaj peev xwm kawm tau, ua tej yam thiab muaj tswv yim! Yog tias koj xav kom sau koj li Pixel Kit 100% offline lossis yog tias tsis muaj wifi muaj, ua rau koj Cov Khoom Siv Pixel nkag rau hauv lub vijtsam xiav thiab zoo siab coding!

Kauj Ruam 7: Code Nrog Teeb

Code Nrog Teeb!
Code Nrog Teeb!

Cov ntaub ntawv

Koj tuaj yeem pom txhua cov ntaub ntawv ntawm yam uas koj tuaj yeem ua nrog koj Cov Khoom Siv Pixel khiav Pixel32 ntawm:

murilopolese.github.io/kano-pixel-kit-pixel32-docs/documentation

Tab sis Pixel Kit kuj tseem muaj tag nrho cov ntaub ntawv offline! Koj tuaj yeem nkag mus nws los ntawm nyem rau ntawm kab lus nug khawm lossis los ntawm kev mus rau https://192.168.4.1/index.html/#!/docs yog tias koj Cov Khoom Siv Pixel tau qhia pom lub vijtsam xiav. Yog tias koj Cov Khoom Siv Pixel tab tom qhia lub vijtsam ntsuab nws yuav yog

Teeb duab

Muaj ob txoj hauv kev los kos ntawm Pixel Kit LEDs: PixelTurtle thiab PixelKit cov tsev qiv ntawv.

Thawj qhov yog txoj hauv kev yooj yim tshaj plaws los pib thiab koj tuaj yeem pom txhua yam nws tuaj yeem ua ntawm:

murilopolese.github.io/kano-pixel-kit-pixel32-docs/pixel-turtle

Qhov thib ob yog lub tsev qiv ntawv qib siab dua (PixelTurtle tau sau siv nws) thiab koj yuav pom yuav siv nws li cas ntawm:

murilopolese.github.io/kano-pixel-kit-pixel32-docs/pixel-kit

Yog tias koj muaj teeb meem nrog Python, tseem muaj cov lus qhia ceev suav nrog hauv cov ntaub ntawv offline thiab ntawm cov kab txuas hauv qab no:

murilopolese.github.io/kano-pixel-kit-pixel32-docs/programming-in-python

Yog tias koj muaj teeb meem uas tsis tau piav qhia hauv cov ntaub ntawv, saib ntawm qhov teeb meem / FAQ nplooj ntawv:

murilopolese.github.io/kano-pixel-kit-pixel32-docs/troubleshooting

Txog kev tshoov siab cov vis dis aus ntawm dab tsi tuaj yeem ua tau los ntawm Pixel Kit, txheeb xyuas nplooj ntawv Qhia:

murilopolese.github.io/kano-pixel-kit-pixel32-docs/tutorials

Pom zoo: