Cov txheej txheem:

Hnab Hnab Ntim: Yuav Ua Li Cas Thiaj Li Taws Teeb: 6 Kauj Ruam
Hnab Hnab Ntim: Yuav Ua Li Cas Thiaj Li Taws Teeb: 6 Kauj Ruam

Video: Hnab Hnab Ntim: Yuav Ua Li Cas Thiaj Li Taws Teeb: 6 Kauj Ruam

Video: Hnab Hnab Ntim: Yuav Ua Li Cas Thiaj Li Taws Teeb: 6 Kauj Ruam
Video: Hwm Pheej Thoj - Rov Mus Txog Vib Nais 2024, Hlis ntuj nqeg
Anonim
Hnab Hnab Ntim: Yuav Ua Li Cas Thiaj Li Taws Teeb
Hnab Hnab Ntim: Yuav Ua Li Cas Thiaj Li Taws Teeb
Hnab Hnab Ntim: Yuav Ua Li Cas Thiaj Li Taws Teeb
Hnab Hnab Ntim: Yuav Ua Li Cas Thiaj Li Taws Teeb
Hnab Hnab Ntim: Yuav Ua Li Cas Thiaj Li Taws Teeb
Hnab Hnab Ntim: Yuav Ua Li Cas Thiaj Li Taws Teeb
Hnab Hnab Ntim: Yuav Ua Li Cas Thiaj Li Taws Teeb
Hnab Hnab Ntim: Yuav Ua Li Cas Thiaj Li Taws Teeb

Nyob zoo rau txhua tus !!

Qhov ntawd yog Cov Lus Qhia ntawm Chip, thiab nws lub hnab ev khoom Pochet CHIP. CHIP yog dab tsi? CHIP yog lub khoos phis tawj me tshaj Linux raws li tsim los ntawm Next Yam los ntawm Kickstarter phiaj los nqis tes. Saib qhov txuas kom pom txhua tus yam ntxwv (https://docs.getchip.com/chip.html#installing-c-h-i-p-sdk). CHIP muaj tag nrho cov khoom ua haujlwm. Muaj Wifi thiab Bluethooth onboard. Koj tuaj yeem ua dab tsi nrog CHIP? Txhua yam koj tuaj yeem ua nrog lub computer. Yog! Pocket CHIP, yog pawg thawj coj uas muaj txhua yam khoom siv xws li keyboard, tshuaj ntsuam thiab GPIO chaw nres nkoj los ua haujlwm nrog CHIP. Koj tuaj yeem pom cov vis dis aus hauv qab no, thiab koj tuaj yeem pom cov yam ntxwv ntawm CHIP's.

Kauj Ruam 1: Cov Ntais Ntawm CHIP thiab Pocket CHIP

Image
Image
Cov yam ntxwv ntawm CHIP thiab hnab tshos CHIP
Cov yam ntxwv ntawm CHIP thiab hnab tshos CHIP
Cov yam ntxwv ntawm CHIP thiab hnab tshos CHIP
Cov yam ntxwv ntawm CHIP thiab hnab tshos CHIP
Cov yam ntxwv ntawm CHIP thiab hnab tshos CHIP
Cov yam ntxwv ntawm CHIP thiab hnab tshos CHIP

Cov yam ntxwv ntawm CHIP yog: Allwinner R8 processor, Realteck RTL8723BS wifi thiab Bluethooth module, 4 Gb NAND, USB txuas, TRRS/AV txuas. CHIP txhawb 802.11b/g/n siv WiFi built-in, thiab Bluetooth 4.0 LE tus qauv siv Bluetooth built-in.

Hnab tshos CHIP yog lub rooj tsavxwm uas muaj cov keyboard kov lub roj teeb thiab GPIO chaw nres nkoj. Tam sim no kuv tus CHIP muaj lub khoos phis tawj los ua haujlwm nrog Pocket CHIP. Tus qauv CHIP tsis muaj tib lub app ntawm CHIP uas ua haujlwm nrog Pocket CHIP, tab sis muaj qhov sib txawv Linux distro. Qhov Linux distro ntawm CHIP yog Debian-8 (Jessie).

Kauj Ruam 2: Cov Ntawv Thov Pocket CHIP… rau tam sim no

Cov Ntawv Thov ntawm Pocket CHIP… rau tam sim no
Cov Ntawv Thov ntawm Pocket CHIP… rau tam sim no
Cov Ntawv Thov ntawm Pocket CHIP… rau tam sim no
Cov Ntawv Thov ntawm Pocket CHIP… rau tam sim no
Cov Ntawv Thov ntawm Pocket CHIP… rau tam sim no
Cov Ntawv Thov ntawm Pocket CHIP… rau tam sim no

Lub app uas tau teeb tsa ua ntej ntawm Linux distro, rau tam sim no, yog Linux Terminal, Pico-8, lub platform thiab ntau ntxiv. Nrog Pico-8 koj tuaj yeem ua si cov kev ua si uas Pico-8 zej zog sib koom nrog lub ntiaj teb, thiab koj tseem tuaj yeem tsim kev ua si zoo heev. Zoo li Atari, thiab 8-ntsis style games.

Nrog Pocket CHIP koj tuaj yeem tsim suab paj nruag! Yog lawm! Muaj ib qho app tau teeb tsa ua ntej uas koj tuaj yeem siv los ua suab zoo li lub suab sib txuas, thiab koj tuaj yeem tsim suab, lossis suab nrov zoo li kuv …

Kuj yog Sau. Nrog sau koj tuaj yeem sau. Yog! Hauv cov duab, koj tuaj yeem pom cov ntaub ntawv browser, thiab tus pabcuam. Tab sis rau kuv qhov zoo tshaj plaws app yog Terminal. Terminal yog tus qauv Linux Terminal. Tam sim no kuv tuaj yeem siv kuv Raspberry Pi los ntawm Chip. Nov yog hom kev txav mus los siv Raspberry Pi.

Kauj Ruam 3: Tsiv Ib Led Nrog Hnab Hnab CHIP

Nyem qhov coj nrog Hnab tshos CHIP
Nyem qhov coj nrog Hnab tshos CHIP
Tsais ib Led nrog Hnab tshos CHIP
Tsais ib Led nrog Hnab tshos CHIP
Tsais ib Led nrog Hnab tshos CHIP
Tsais ib Led nrog Hnab tshos CHIP

Zoo li kuv nyuam qhuav tau hais tias koj tuaj yeem siv GPIO pinout ntawm CHIP uas hais kom txhua yam khoom kho vajtse uas koj tuaj yeem ntes tau nyob qhov twg. Zoo! Txhua qhov kev mus ncig pib los ntawm ib qho chaw. Qhov chaw no rau peb yog tus coj. Yog, tus coj yog "Nyob Zoo Ntiaj Teb" rau cov khoom siv hluav taws xob. Tam sim no tsis muaj lo lus, ntau qhov tseeb. Koj tuaj yeem siv lub teeb liab coj zoo li hauv daim duab. Siv lub resistor. Thiab saib cov lus qhia.

Tam sim no hloov ntawm koj lub hnab tshos CHIP thiab teeb tsa CHIP_IO tsev qiv ntawv ntawm koj lub hnab tshos CHIP. Txhawm rau ua qhov no sau cov lus txib no hauv Terminal qhov rai:

sudo ntpdate pool.ntp.org

sudo apt-tau hloov tshiab

sudo apt-tau nruab git tsim-qhov tseem ceeb nab hab sej-dev nab nab-pip -y

git clone git: //github.com/xtacocorex/CHIP_IO.git

cd CHIP_IO

sudo python setup.py nruab

cd ua..

sudo rm -rf CHIP_IO

Tam sim no koj muaj CHIP_IO ntawm koj lub hnab tshos CHIP.

Kauj Ruam 4: Sau Txoj Haujlwm Python kom ntsais muag Led

Nou koj tuaj yeem qhib Terminal qhov rai, thiab sau cov lus txib no:

sudo nano blink.py

Tom qab qhov kev tshuaj ntsuam lub sijhawm thiab koj tuaj yeem sau cov lus txib no:

ntshuam CHIP_IO. GPIO ua GPIO

lub sij hawm ntshuam

GPIO.cleanup ()

GPIO.setup ("XIO-P2", GPIO. OUT)

luam "Toggling XIO-P1 10 zaug …"

rau kuv hauv ntau (0, 10):

GPIO.output ("XIO-P2", GPIO. LOW)

sijhawm.s pw (0.1)

GPIO.output ("XIO-P2", GPIO. HIGH)

sijhawm.s pw (0.1)

GPIO.cleanup ()

Tom qab koj tuaj yeem txuag qhov no los ntawm txhaj Ctrl+xWrite Y ob zaug, thiab tataaa koj tau sau koj thawj qhov program Python.

Kauj Ruam 5: Txuas Cov Khoos Phis Tawj

Txuas Cov Khoom Kho Vajtse
Txuas Cov Khoom Kho Vajtse
Txuas Cov Khoom Kho Vajtse
Txuas Cov Khoom Kho Vajtse

Tam sim no yog lub sijhawm kho vajtse. Koj tuaj yeem pom daim duab. Txuas tus pin zoo ntawm tus coj ntawm 5 volt GPIO tus pin. Tus lej tsis zoo ntawm coj mus rau tus tiv thaiv, thiab tus tiv thaiv ntawm GPIO 1. Tus pin zoo ntawm coj yog ntev dua qhov tsis zoo. Qhov kev teeb tsa no zoo rau Pocket CHIP. Nco ntsoov siv tus tiv thaiv ib txwm, txwv tsis pub, koj tuaj yeem hlawv Pocket CHIP.

Kauj Ruam 6: Qhib Txoj Haujlwm

Tam sim no koj tuaj yeem tso te program los ntawm lub qhov rai qhov rai. Qhib Terminal, thiab sau sudo nab hab sej lub npe ntawm cov ntawv sau ua ntej.sudo python blink.py

Pom zoo: