Cov txheej txheem:

R.O.B. Xov Tooj Pabcuam Xov Tooj: 13 Kauj Ruam
R.O.B. Xov Tooj Pabcuam Xov Tooj: 13 Kauj Ruam

Video: R.O.B. Xov Tooj Pabcuam Xov Tooj: 13 Kauj Ruam

Video: R.O.B. Xov Tooj Pabcuam Xov Tooj: 13 Kauj Ruam
Video: Tseem Nyob Tos Koj (lyrics) - Meena Thao 2024, Kaum ib hlis
Anonim
R. O. B. Tus Xov Tooj Pabcuam Xov Tooj
R. O. B. Tus Xov Tooj Pabcuam Xov Tooj

Los ntawm khinds10www.kevinhinds.com Ua raws ntau los ntawm tus sau:

Indestructible Kids Couch!
Indestructible Kids Couch!
Indestructible Kids Couch!
Indestructible Kids Couch!
Quick thiab Easy Wall Mount PCs
Quick thiab Easy Wall Mount PCs
Quick thiab Easy Wall Mount PCs
Quick thiab Easy Wall Mount PCs
Cov Qhov Rooj Hluav Taws Xob
Cov Qhov Rooj Hluav Taws Xob
Cov Qhov Rooj Hluav Taws Xob
Cov Qhov Rooj Hluav Taws Xob

Txog: 3D luam ntawv thiab tsim qauv RaspberryPI cov haujlwm rau ob peb xyoos tam sim no Ntxiv Txog khinds10 »

Tus Xov Tooj Pab Tus Xov Tooj Pab Nrog (ROB) Robotic Operating Buddy

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 "RobbieAssistant"

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

Pib Txhim Kho cov pob khoom xav tau

$ sudo apt-tau hloov tshiab

$ sudo apt-tau hloov tshiab

$ sudo apt-get install build-essential tk-dev libbz2-dev libexpat1-dev liblzma-dev zlib1g-dev libdb5.3-dev libgdbm-dev libsqlite3-dev libssl-dev libncurses5-dev libncursesw5-dev libreadline6-dev python3-pip python3-thov python3-setuptools python3-urllib python3-urllib3 python3-thov vim git python-smbus i2c-tools python-imaging python-smbus build-essential python-dev rpi.gpio python3 python3-pip vim git python-smbus sej-imaging sej-smbus build-essential sej-dev rpi.gpio python3 python3-pip libi2c-dev vim git python-smbus i2c-tools python-imaging python-smbus build-essential python-dev rpi.gpio python3 python3-pip nab -gpiozero nab hab sej-psutil xz-utils

$ sudo pip nruab thov

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

ua cov ntawv tais ceev tseg rau daim ntawv thov kom khiav mkdir/home/pi/RobbieAssistant/cav

chmod 777/tsev/pi/RobbieAssistant/cav

Configure Application kom ua haujlwm raug nyob rau hauv settings.py teeb tsa cov ntaub ntawv Nrhiav cov ntaub ntawv teeb tsa-shadow.py hauv / suav nrog / nplaub tshev ntawm txoj haujlwm thiab luam nws mus rau settings.py thiab hloov kho rau koj qhov chaw tam sim no

# forecast.io API qhov tseem ceeb rau cov ntaub ntawv huab cua hauv zos

weatherAPIURL = 'https://api.forecast.io/forecast/'

weatherAPIKey = 'Koj li API KEY FOR FORASAST. IO'

# yeem rau kev khiav lub ntsuas cua/cov av nyob deb deb

dashboardServer = 'mydevicelogger.com'

# tshawb google kom tau txais Latitude/Longitude rau koj qhov chaw nyob

latitude = 41.4552578

ntev = -72.1665444

Kauj Ruam 2: Cov Khoom Xav Tau

Cov Khoom Siv Xav Tau
Cov Khoom Siv Xav Tau
Cov Khoom Siv Xav Tau
Cov Khoom Siv Xav Tau
Cov Khoom Siv Xav Tau
Cov Khoom Siv Xav Tau
Cov Khoom Siv Xav Tau
Cov Khoom Siv Xav Tau

RaspberriPi Xoom

DHT11 Humidistat

LED Teeb (x4) Ntsuab / Daj / Xiav / Liab2.6 Digole Zaub

Kauj ruam 3: Tsim thiab xaim lub cuab yeej

Tsim thiab xaim lub cuab yeej
Tsim thiab xaim lub cuab yeej

Npaj Digole Display rau i2C

Nyob rau sab nraum qab ntawm Digole Zaub, siv lub jumper los muab cov zaub los siv i2c raws tu qauv

Kauj Ruam 4: Siv lub tshuab luam ntawv 3d, Luam Lub Npog, Lub Thawv thiab Cov Vaj Huam Sib Luag Tom Qab

Siv lub tshuab luam ntawv 3d, Luam Lub Npog, Lub Thawv thiab Cov Pem Hauv Ntej
Siv lub tshuab luam ntawv 3d, Luam Lub Npog, Lub Thawv thiab Cov Pem Hauv Ntej

Siv cov ntaub ntawv X STL hauv qab no hauv 3DPrint nplaub tshev, R. O. B. Neeg hlau, LED Harness thiab Zaub Mount

khawmContainer-base.stl

khawmContainer-lid.stl

displaymount-final.stl

coj-hlua-kawg.stl

MiniNintendoROB.zip

Neeg Hlau Luam los ntawm: Mini Nintendo R. O. B. - los ntawm RabbitEngineering

www.thingiverse.com/thing1494964

Kuv siv daim kab xev liab los ua qhov muag liab nrog cov visor dub tom qab

Kauj Ruam 5: Kev Txuas Hluav Taws Xob

Cheebtsam thaiv
Cheebtsam thaiv

Digole Zaub

GND -> GND

DATA -> SDA

CLK -> SCL

VCC -> 3V

DHT11 Humidistat

VCC -> 5V

GND -> GND

Cov ntaub ntawv -> GPIO 25

Xiav Resistor

VCC -> GPIO 17 (nrog 270ohm resistor)

GND -> GND

YELLOW Resistor

VCC -> GPIO 13 (nrog 270ohm resistor)

GND -> GND

GREEN Resistor

VCC -> GPIO 6 (nrog 270ohm resistor)

GND -> GND

RED tiv thaiv

VCC -> GPIO 12 (nrog 270ohm resistor)

GND -> GND

RED Momentary Pushbutton

VCC -> GPIO 16 (nrog 270ohm resistor)

GND -> GND

XEEB Momentary Pushbutton

VCC -> GPIO 26 (nrog 270ohm resistor)

GND -> GND

Kauj Ruam 6: Txuas Cov Khoom Siv rau Robot

Txuas cov Cheebtsam rau Neeg Hlau
Txuas cov Cheebtsam rau Neeg Hlau
Txuas cov Cheebtsam rau Neeg Hlau
Txuas cov Cheebtsam rau Neeg Hlau
Txuas cov Cheebtsam rau Neeg Hlau
Txuas cov Cheebtsam rau Neeg Hlau

Tom qab koj tau luam tawm lub vijtsam tuav, txuas nws mus rau digole zaub

Txuas Cov Zaub rau RPi nrog cov xov hlau txaus los lo RPi rau sab nraum qab ntawm tus neeg hlau

Luam cov maub los thiab xaim cov nyees khawm kom muaj cov hlua txaus kom nws mus rau tom qab ntawm tus neeg hlau

Tiav Cov Xov Tooj thiab sib dhos cov neeg hlau nrog RPi txuas rau sab nraub qaum thiab DHT11 txuas rau hauv qab

Kauj Ruam 7: Txheeb xyuas I2C Kev Kho

Pib pib koj li RaspberryPi thiab paub tseeb tias I2C npav paub txhua yam koj txuas nrog 7/14 ntu qhia. [txhua qhov khoom tau muab rau qhov chaw nyob tshwj xeeb tau piav qhia saum toj no los ntawm qhov koj solder txhua cov zaub dhia hauv kev sib txuas sib txawv]

Yog tias koj muaj cov zaub nrog jumper soldered raug, koj yuav tsum muaj cov zis hauv qab no rau i2cdetect hais kom ua:

sudo i2cdetect -y 1

0 1 2 3 4 5 6 7 8 9 a b c d e f 00: - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -1 0 3 2 5 4 5 6 7 8 9

10: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --

20: -- -- -- -- -- -- -- 27 -- -- -- -- -- -- -- --

30: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --

40: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --

50: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --

60: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --

70: -- -- -- -- -- -- -- --

Kauj Ruam 8: DHT11 Nruab

$ cd ~ ib

$ git clone

$ cd Adafruit_Python_DHT/

$ sudo python setup.py nruab

$ sudo nab hab sej ez_setup.py

$ cd piv txwv/

$ vi simpletest.py Hloov cov kab hauv qab no:

sensor = Adafruit_DHT. DHT11

Tawm tswv yim kab tawm

pin = 'P8_11'

Tsis suav nrog kab thiab hloov tus lej tus lej rau 16

pin = 25

Khiav qhov kev xeem

nab hab sej simpletest.py

Koj yuav tsum pom qhov ntsuas ntsuas ntawm Temp thiab Vaum pom ntawm kab hais kom ua.

Kauj ruam 9: Clone Repository

$ cd ~ $ git clone

Kauj Ruam 10: Ntxiv Pushbullet API (siv Python 3.5)

Siv lub pushbullet app rau koj lub xov tooj, sau npe kom tau txais tus lej API kom muaj cov ntawv nab nab yooj yim tuaj yeem ntes thiab thawb cov ntawv ceeb toom hauv nruab nrab thiab qhia tus chij

Nruab Python 3.5 rau asyncio ua haujlwm

$ sudo apt-tau hloov tshiab sudo apt-tau nruab tsim-qhov tseem ceeb tk-dev sudo apt-tau nruab libncurses5-dev libncursesw5-dev libreadline6-dev sudo apt-tau nruab libdb5.3-dev libgdbm-dev libsqlite3-dev libssl-dev sudo apt-tau nruab libbz2-dev libexpat1-dev liblzma-dev zlib1g-dev Yog tias ib qho ntawm cov pob khoom tsis tuaj yeem pom, sim tus lej tshiab version (piv txwv li libdb5.4-dev hloov ntawm libdb5.3-dev).

$ wget https://www.python.org/ftp/python/3.5.2/Python-3…. tar zxvf Python-3.5.2.tgz cd Python-3.5.2./configure --prefix =/usr/local/opt/python-3.5.2 ua sudo ua nruab sudo ln -s/usr/local/opt/python -3.5.2/bin/pydoc3.5 /usr/bin/pydoc3.5 sudo ln -s /usr/local/opt/python-3.5.2/bin/python3.5 /usr/bin/python3.5 sudo ln -s /usr/local/opt/python-3.5.2/bin/python3.5m /usr/bin/python3.5m sudo ln -s /usr/local/opt/python-3.5.2/bin/pyvenv-3.5 /usr/bin/pyvenv-3.5 sudo ln -s /usr/local/opt/python-3.5.2/bin/pip3.5 /usr/bin/pip3.5 cd ~ echo 'alias python35 = "/usr/zos /opt/python-3.5.2/bin/python3.5 "'>>.bashrc echo' alias idle35 ="/usr/local/opt/python-3.5.2/bin/python3.5 "'>>.bashrc Txhim kho cov nab hab sej 3 kev vam khom

$ sudo apt-tau nruab python3-setuptools sudo apt-tau nruab python3-pip sudo pip3 nruab asyncpushbullet sudo pip3 teeb tsa kev thov Xaiv txoj hauv kev rub lub sej chaw cia ncaj qha kom tau txais nab nab vam tsis muaj kev siv pip txhim kho nws

git clone https://github.com/rharder/asyncpushbullet cd asyncpushbullet && sudo /usr/local/opt/python-3.5.2/bin/python3.5 setup.py install Mus ntsib cov nplooj ntawv teeb tsa hauv koj tus account kom tsim API tus yuam sij siv

Kho koj cov ntawv pushbullet-listener.py kom muaj qhov tseeb API thiab dashboard nruab nrab tus tswv tsev

# koj tus lej API los ntawm PushBullet.com API_KEY = "o. XXXYYYZZZ111222333444555666"

# dashboard central server host dashboardServer = 'MY-SERVER-HERE.com'

Kauj Ruam 11: Ntxiv Tsab Ntawv los Pib ntawm Dashboard Boot thiab Rov Pib Koj Lub Dashboard Pi

$ crontab -e

@reboot nohup /usr/local/opt/python-3.5.2/bin/python3.5 /home/pi/PushBullet/pushbullet-listener.py>/dev/null 2> & 1

@reboot nohup /usr/local/opt/python-3.5.3/bin/python3.5 /home/pi/RobbieAssistant/PushBullet/pushbullet-listener.py>/dev/null 2> & 1

@reboot nohup nab hab sej /home/pi/RobbieAssistant/Robbie.py>/dev/null 2> & 1

@reboot nohup nab hab sej /home/pi/RobbieAssistant/Temp.py>/dev/null 2> & 1

@reboot nohup nab hab sej /home/pi/RobbieAssistant/Weather.py>/dev/null 2> & 1

Kauj Ruam 12: Xaiv tau: Tsim Koj Tus Kheej Cov Duab Nintendo los Muab rau ntawm Zaub

Upload koj tus kheej 128x128 cov ntaub ntawv rau hauv qab no URL:

www.digole.com/tools/PicturetoC_Hex_converter.php

Xaiv koj cov ntaub ntawv duab rau upload, ntxiv qhov loj me koj xav kom nws nyob ntawm qhov screen (Dav/Qhov siab)

Xaiv "256 Xim rau Xim OLED/LCD (1 byte/pixel)" hauv "Siv rau" qhov poob qis

Tau txais cov txiaj ntsig hex.

Ntxiv cov hex cov zis rau cov zaub/ tsim/ header (.h) cov ntaub ntawv, siv lwm tus los ua cov lus qhia rau cov lus sib xyaw.

Suav nrog cov ntawv tshiab hauv cov ntaub ntawv digole.c #include myimage.h

Suav nrog kab lus hais kom ua tshiab txuas rau koj cov ntaub ntawv duab hauv. Nco tseg: cov lus txib hauv qab no yog hais kos koj cov duab ntawm txoj haujlwm 10 pixels tshaj 10 pixels nqis. Koj tuaj yeem hloov nws mus rau X sib txawv, Y tswj hwm, koj tseem tuaj yeem hloov qhov muaj nuj nqis 128, 128 rau qhov loj me me uas koj cov duab tshiab yog.

} lwm yog (strcmp (digoleCommand, "myimage") == 0) {drawBitmap256 (10, 10, 128, 128, & myimageVariableHere, 0); // myimageVariableQhov no yog txhais hauv koj (.h) cov ntaub ntawv}

Tam sim no rov tsim dua (tsis quav ntsej qhov ua tsis raug) hauv qab no kom muaj koj cov duab tshiab ua nrog cov lus txib hauv qab no.

$./digole myimage

Rov Tsim Kho [suav nrog] Digole Display Driver rau koj qhov kev hloov pauv tau

$ cd tso saib/tsim

$ gcc digole.c

$ mv a.out../../digole

$ chmod +x../../digole

Kauj ruam 13: Ua tiav

Koj ua tiav!

Pom zoo: