Cov txheej txheem:
- Kauj Ruam 1: Cov Ntais Ntawm CHIP thiab Pocket CHIP
- Kauj Ruam 2: Cov Ntawv Thov Pocket CHIP… rau tam sim no
- Kauj Ruam 3: Tsiv Ib Led Nrog Hnab Hnab CHIP
- Kauj Ruam 4: Sau Txoj Haujlwm Python kom ntsais muag Led
- Kauj Ruam 5: Txuas Cov Khoos Phis Tawj
- Kauj Ruam 6: Qhib Txoj Haujlwm
Video: Hnab Hnab Ntim: Yuav Ua Li Cas Thiaj Li Taws Teeb: 6 Kauj Ruam
2024 Tus sau: John Day | [email protected]. Kawg hloov kho: 2024-01-30 09:27
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
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
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
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
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:
Cov Hnab Hnab Hnab Tsho Hnab Tsho Chaw Nyob: 11 Kauj Ruam
Cov Hnab Ntim Hnab Hauv Cov Chaw Taws Teeb: Tam sim no ib hnub cov thev naus laus zis tau txav mus rau qhov kev paub ntau ntxiv uas muab rau tus neeg siv txoj hauv kev tshiab los cuam tshuam nrog yam khoom hauv ib puag ncig virtual lossis kev muaj tiag. Nrog thev naus laus zis hnav tau nce zuj zus thiab ntau ntxiv nrog cov xov tooj ntse ntxiv rau
Cov Ntim Ntim Ntim: 8 Kauj Ruam (nrog Duab)
Cov Lus Hais Tias: Hauv Asmeskas ib leeg, cov neeg Amelikas nruab nrab mus txog 7 phaus khib nyiab txhua hnub. Ntau tshaj ib lab tons ntawm cov kaus poom tin tau muab pov tseg txhua xyoo. Kev rov ua dua tshiab yog qhov zoo dua li sau cov chaw pov tseg, tab sis rov siv dua thiab rov ntim dua lwm cov ntim pov tseg yog
Yuav Ua Li Cas Thiaj Siv Hluav Taws Xob Hluav Taws Xob Siv BC547 Transistor: 8 Kauj Ruam
Yuav Ua Li Cas Thiaj Siv Hluav Taws Xob Hluav Taws Xob Siv BC547 Transistor: Hii tus phooj ywg, Hnub no kuv tab tom yuav ua hluav taws xob ntawm cov xov hluav taws xob txuas hluav taws xob siv BC547 transistor.Yog leej twg yuav txiav cov hlau ces nws yuav liab LED yuav ci thiab Buzzer yuav muab lub suab
Yuav Ua Li Cas Siv Cov Hluav Taws Xob Hluav Taws Xob Hluav Taws Xob Hluav Taws Xob Module: 6 Kauj Ruam
Yuav Ua Li Cas Siv Cov Hluav Taws Xob Hluav Taws Xob Hluav Taws Xob Hluav Taws Xob Module: Nco tseg thiab ceev faj: CFL muaj cov mercury uas yog cov khoom phom sij, yog li nws yuav tsum tau ua raws li feem ntau CFL cov teeb, hluav taws xob hluav taws xob tau ua haujlwm zoo thiab tseem siv tau, tsuas yog lub teeb mus tsis zoo. CFL Circuit Court ntawm 18-24 Watts yog
Yuav Ua Li Cas Thiaj Li Taws Teeb Tsom Teeb LED Teeb: 11 Kauj Ruam
Yuav Ua Li Cas Kom Taws Teeb Tsaus Teeb LED Teeb: Hauv Cov Lus Qhia no kuv yuav qhia koj yuav ua li cas kom yooj yim ntsais muag LED teeb uas koj tuaj yeem txuas rau koj lub tsheb kauj vab lossis txhua qhov chaw koj xav tau. Nws ntsais muag ntau dua 3 zaug hauv ib pliag. Nws yog qhov pheej yig los ua ib qho dua li yuav ib qho. Koj tuaj yeem ua nws dawb ntawm koj