Cov txheej txheem:
- Kauj Ruam 1: Flashing RaspberriPi Hard Disk / Install Required Software (Siv Ubuntu Linux)
- Kauj Ruam 2: Pib Txhim Kho Cov Pob Yuav Tsum Muaj
- Kauj Ruam 3: Cov Khoom Xav Tau
- Kauj Ruam 4: Tsim Lub Sijhawm Sprite
- Kauj Ruam 5: Luam tawm qhov Project Enclosure
- Kauj Ruam 6: Daim Kab Xev Luam Tawm Pixel Defuser mus rau LED Matrix, Txau Frosted Dawb Xim thiab Txiav Ib Daim Ntawm Cov Plexi-iav mus rau Tom Qab Xev Xauv Sab saum toj ntawm Defuser
- Kauj Ruam 7: Pib Txuas Cov Khoom Siv
- Kauj Ruam 8: Rooj Sib Tham Kawg
- Kauj Ruam 9: Pib Sau Ntawv
Video: 8 Ntsis Sprite Clock: 10 Kauj Ruam
2024 Tus sau: John Day | [email protected]. Kawg hloov kho: 2024-01-30 09:27
Los ntawm khinds10www.kevinhinds.com Ua raws ntau los ntawm tus sau:
Txog: 3D luam ntawv thiab tsim qauv RaspberryPI cov haujlwm rau ob peb xyoos tam sim no Ntxiv Txog khinds10 »
Game Game Nintendo Sijhawm w/ Tus phooj ywg Sprites tos txais koj
Kauj Ruam 1: Flashing RaspberriPi Hard Disk / Install Required Software (Siv Ubuntu Linux)
Tsim koj lub hard disk tshiab rau DashboardPI
Ntxig lub microSD rau koj lub khoos phis tawj ntawm USB adapter thiab tsim cov duab disk siv cov lus txib dd
Nrhiav koj daim npav microSD tso ntawm df -h hais kom ua, unmount nws thiab tsim cov duab disk nrog daim disk theej daim ntawv dd
$ df -h/dev/sdb1 7.4G 32K 7.4G 1%/media/XXX/1234-5678
$ umount /dev /sdb1
Ceev faj: nco ntsoov tias cov lus txib yog qhov tseeb, koj tuaj yeem ua rau lwm lub disks puas tsuaj nrog cov lus txib no
yog = qhov chaw ntawm RASPBIAN JESSIE LITE duab cov ntaub ntawv ntawm = qhov chaw ntawm koj daim npav microSD
$ sudo dd bs = 4M yog =/path/to/raspbian-jessie-lite.img ntawm =/dev/sdb (ceeb toom: qhov no, nws yog/dev/sdb,/dev/sdb1 yog lub koomhaum uas twb muaj lawm muab faib rau ntawm microSD)
Teeb koj li RaspberriPi
Ntxig koj daim npav microSD tshiab rau raspberrypi thiab siv nws nrog lub ntsuas saib txuas nrog rau HDMI chaw nres nkoj
ID nkag mus
neeg siv: pi pass: raspberry
Hloov koj tus lej password rau kev nyab xeeb
sudo passwd pib
Pab kom RaspberriPi Advanced Options
sudo raspi-teeb tsa
Xaiv: 1 Nthuav Cov Ntaub Ntawv System
9 Advanced Options
A2 Hostname hloov nws mus rau "SpriteClock"
A4 SSH Pab kom SSH Server
A7 I2C Pab kom i2c interface
Pab kom Askiv/Asmeskas Keyboard
sudo nano/etc/default/keyboard
Hloov cov kab hauv qab no: XKBLAYOUT = "peb"
Rov pib dua PI rau Keyboard hloov pauv / cov txheej txheem txheej txheem hloov pauv kom muaj txiaj ntsig
$ sudo kaw -r tam sim no
Auto-Txuas rau koj li WiFi
sudo nano /etc/wpa_supplicant/wpa_supplicant.conf
Ntxiv cov kab hauv qab no kom muaj koj cov raspberrypi txuas nrog koj lub WiFi hauv tsev (yog tias koj lub wireless network npe "linksys" piv txwv, piv txwv li hauv qab no)
network = {ssid = "linksys" psk = "WIRELESS PASSWORD HERE"} Rov pib PI txuas rau WiFi network
$ sudo kaw -r tam sim no
Tam sim no tias koj tus PI yog qhov kawg ntawm lub network hauv zej zog, koj tuaj yeem nkag mus rau nws deb ntawm SSH. Tab sis ua ntej koj yuav tsum tau txais tus IP chaw nws tam sim no muaj.
$ ifconfig Saib rau "inet addr: 192.168. XXX. XXX" hauv cov lus txib hauv qab no tso tawm rau koj tus PI IP Chaw Nyob
Mus rau lwm lub tshuab thiab nkag mus rau koj li raspberrypi ntawm ssh
$ ssh [email protected]. XXX. XXX
Kauj Ruam 2: Pib Txhim Kho Cov Pob Yuav Tsum Muaj
Pib Txhim Kho cov pob khoom xav tau
$ sudo apt-tau hloov tshiab
$ sudo apt-tau hloov tshiab
$ sudo apt-tau nruab vim git python-smbus i2c-tools python-imaging python-smbus build-essential python-dev rpi.gpio python3 python3-pip python-numpy
Hloov kho thaj chaw sijhawm hauv cheeb tsam
$ sudo dpkg-reconfigure tzdata
xaiv koj lub sijhawm siv lub interface
Teeb cov npe yooj yim l hais kom ua [xaiv tau]
vi ~/.bashrc
ntxiv cov kab hauv qab no:
alias l = 'ls -lh'
qhov chaw ~/.bashrc
Txhim kho VIM default syntax highlighting [yeem]
sudo vi/etc/vim/vimrc
tsis pom zoo cov kab hauv qab no:
syntax yog
Nruab i2c Backpack Python Drivers
$ cd ~ ib
$ git clone
$ cd Adafruit_Python_LED_Backpack/
$ sudo python setup.py nruab
Nruab i2c Python Tsav Tsheb
Nruab NeoPixel Driver raws li hauv qab no
sudo apt-tau nruab tsim-qhov tseem ceeb nab hab sej-dev git scons swig
sudo pip3 nruab -hloov kho setuptools
sudo pip3 nruab rpi_ws281x
cd rpi_ws281x
saib xyuas
cd python
sudo python setup.py nruab
cd piv txwv/
sudo nab hab sej strandtest.py
Clone lub chaw cia khoom hauv koj phau ntawv teev npe hauv tsev rau lub moos ua haujlwm
cd ~ ib
git clone
Kauj Ruam 3: Cov Khoom Xav Tau
Pi Zero W/1.3/1.2Wifi USB (yog Pi Zero 1.3/1.2) Keyestudio I2C 8x8 LED Matrix HT16K33 (x7) 16x16 RGB LED Saj zawg zog WS2812B MatrixFrosted Paint12x12 Daim Duab Duab plexi-iav ntawv
Kauj Ruam 4: Tsim Lub Sijhawm Sprite
Npaj HT16K33 matrix units
Muab cov pins tso rau sab nraub qaum kom muab lawv ib qho tshwj xeeb i2c chaw nyob. Muaj 3 tus neeg dhia mus rau cov laug lossis tsis laug hauv 8 qhov sib txuas ua ke. Kuv tau muab tag nrho cov kev sib txuas ua ke los faib rau txhua chav nyob qhov sib txawv kom nkag mus tau los ntawm tus nab npawb nab npawb los qhia lub sijhawm teev.
Kauj Ruam 5: Luam tawm qhov Project Enclosure
Hauv daim ntawv luam tawm 3D pom "defuser-grid-final.stl" luam qauv los ua tus pixel ua haujlwm tsis pom kev tsom mus rau lub teeb los ntawm txhua LED mus rau ib lub xwmfab zoo los txhim kho cov sprites ntawm lub moos.
Kauj Ruam 6: Daim Kab Xev Luam Tawm Pixel Defuser mus rau LED Matrix, Txau Frosted Dawb Xim thiab Txiav Ib Daim Ntawm Cov Plexi-iav mus rau Tom Qab Xev Xauv Sab saum toj ntawm Defuser
Qhov no yuav txuas ntxiv ua kom lub teeb pom kev ntau dua txhawm rau txhim kho qhov pom kev pom tseeb.
Kauj Ruam 7: Pib Txuas Cov Khoom Siv
HT16K33 Matrix Chav Nyob
GND -> GND
DATA -> SDA
CLK -> SCL
VCC -> 5V
RGB 16x16 Chav
GND -> GND
Cov Ntaub Ntawv -> GPIO 18
VCC -> 5V
Kauj Ruam 8: Rooj Sib Tham Kawg
Nyob rau qhov chaw ntawm daim duab ib txwm iav iav, hloov nws nrog 2 txoj kev daim iav (12x12 "ntawv) thiab cov yas yas tinted iav (12x12" ntawv)
Qhov no yuav zais cov khoom siv sab hauv lub thav duab, yog li koj tuaj yeem pom tsuas yog lub teeb pixel tso tawm.
Kab xev ua ke HT16K33 chav nyob hauv kab khoom
Nco ntsoov tias txhua chav nyob tau hais los ntawm / 0x70 txog / 0x76 uake rau txoj cai kom ua haujlwm (koj tuaj yeem kho qhov chaws yog tias lawv tsis xaj tom qab)
Muab cov khoom sib koom ua ke sab thav duab nrog daim iav thiab tinted iav ntsia
Tam sim no koj tuaj yeem tso sab nraum qab ntawm tus ncej kom tuav cov khoom sib dhos. Qhov no yuav yog qhov nyuaj tshaj plaws, Kuv muaj hmoo kom muaj cov thav duab uas muaj qhov yoog txaus rov qab. Kuv tau txais txhua qib thiab nws zoo heev.
Kauj Ruam 9: Pib Sau Ntawv
Teeb tus neeg siv crontab
Nkag mus rau kab hauv qab no rau ib feeb dhau ib feeb crontab
$ crontab -e
@reboot nohup nab hab sej /home/pi/NESClock/MatrixClock.py>/dev/null 2> & 1
Teeb tus neeg siv hauv paus crontab (RGB Sprite Vaj huam sib luag lub tsev qiv ntawv yuav tsum tau nkag mus hauv paus) Teeb "ntawm reboot" kom khiav cov tswm ciab nab nab
$ sudo ua
$ crontab -e
@reboot nohup nab hab sej /home/pi/NESClock/SpritePanel.py>/dev/null 2> & 1
Pom zoo:
Arduino Nano-MMA8452Q 3-Axis 12-ntsis/8-ntsis Digital Accelerometer Tutorial: 4 Kauj Ruam
Arduino Nano-MMA8452Q 3-Axis 12-ntsis/8-ntsis Digital Accelerometer Tutorial: MMA8452Q yog tus ntse, tsis muaj zog, peb-axis, muaj peev xwm, micromachined accelerometer nrog 12 qhov kev daws teeb meem. Cov neeg siv yooj yim programmable xaiv tau muab nrog kev pab ntawm kev ua haujlwm hauv lub ntsuas qhov ntsuas, teeb tsa tau rau ob qho kev cuam tshuam
Yuav Ua Li Cas Siv Servo Motors Siv Moto: ntsis Nrog Micro: ntsis: 7 Kauj Ruam (nrog Duab)
Yuav Ua Li Cas Siv Servo Motors Siv Moto: ntsis Nrog Micro: ntsis: Ib txoj hauv kev txuas ntxiv kev ua haujlwm ntawm micro: ntsis yog siv lub rooj tsav xwm hu ua moto: ntsis los ntawm SparkFun Electronics (kwv yees li $ 15-20). Nws zoo li nyuaj thiab muaj ntau yam ntxwv, tab sis nws tsis nyuaj rau kev ua haujlwm servo motors los ntawm nws. Moto: me ntsis tso cai rau koj
Raspberry Pi MMA8452Q 3-Axis 12-ntsis/8-ntsis Digital Accelerometer Python Qhia: 4 Kauj Ruam
Raspberry Pi MMA8452Q 3-Axis 12-ntsis/8-ntsis Digital Accelerometer Python Tutorial: MMA8452Q yog tus ntse, tsis muaj zog, peb-axis, muaj peev xwm, micromachined accelerometer nrog 12 qhov kev daws teeb meem. Cov neeg siv yooj yim programmable xaiv tau muab nrog kev pab ntawm kev ua haujlwm hauv lub ntsuas qhov ntsuas, teeb tsa tau rau ob qho kev cuam tshuam
Raspberry Pi MMA8452Q 3-Axis 12-ntsis/8-ntsis Digital Accelerometer Java Qhia: 4 Kauj Ruam
Raspberry Pi MMA8452Q 3-Axis 12-ntsis/8-ntsis Digital Accelerometer Java Tutorial: MMA8452Q yog tus ntse, tsis muaj zog, peb-axis, muaj peev xwm, micromachined accelerometer nrog 12 qhov kev daws teeb meem. Cov neeg siv yooj yim programmable xaiv tau muab nrog kev pab ntawm kev ua haujlwm hauv lub ntsuas qhov ntsuas, teeb tsa tau rau ob qho kev cuam tshuam
Kev ntsuas lub teeb thiab xim Nrog Pimoroni Enviro: ntsis rau Micro: ntsis: 5 Kauj Ruam
Kev ntsuas lub teeb thiab xim Nrog Pimoroni Enviro: me ntsis rau Micro: me ntsis: Kuv tau ua haujlwm ntawm qee lub cuab yeej uas tso cai ntsuas lub teeb thiab xim yav dhau los thiab koj yuav pom ntau txog qhov kev xav tom qab kev ntsuas ntsuas cov lus qhia ntawm no thiab ntawm no.Pimoroni muaj tsis ntev los no tso tawm enviro: me ntsis, ntxiv rau