Cov txheej txheem:

Kev Tshawb Nrhiav Xim Raws Li Lub Hom Phiaj Taug Kev: 10 Kauj Ruam
Kev Tshawb Nrhiav Xim Raws Li Lub Hom Phiaj Taug Kev: 10 Kauj Ruam

Video: Kev Tshawb Nrhiav Xim Raws Li Lub Hom Phiaj Taug Kev: 10 Kauj Ruam

Video: Kev Tshawb Nrhiav Xim Raws Li Lub Hom Phiaj Taug Kev: 10 Kauj Ruam
Video: N. TxoovKav Hu Nkauj Rooj Txhawb Siab (Lao Cai) || CIA KEV HLUB NTWS MUS || N.TxoovKav channel 2024, Kaum ib hlis
Anonim
Image
Image

Dab neeg

Kuv tau ua qhov haujlwm no kom kawm paub ua duab siv Raspberry PI thiab qhib CV. Txhawm rau ua txoj haujlwm no kom zoo dua Kuv tau siv ob lub SG90 Servo motors thiab teeb lub koob yees duab rau nws. Ib lub cav siv txav txav mus los thiab lub cav thib ob siv txav mus los ntsug.

Khoom siv

Kev Sau Tag Nrho

Kev nrhiav xim raws li Lub Hom Phiaj Saib Xyuas

1. Nruab Raspbian Strech ntawm Raspberry 3B+

a Txheeb xyuas kuv cov vis dis aus YouTube los ntawm: - rau 15:10 txog 16:42 - >>

b. Siv HDMI-VGA hloov pauv los txuas RPI nrog saib & USB Keyboard & nas.

c. Khau raj RPI desktop thiab ua raws cov kauj ruam tom ntej.

d. Pom zoo kom siv saib xyuas yog tias koj yog tus pib ua kev nkag ncaj qha ntawm PI yooj yim rau cov neeg tshiab.

2. Nruab Qhib CV ntawm RPI3B+

a

b. Sijhawm Siv:- Kwv yees li 8+ Teev Sijhawm

c. Kuv siv ob hnub txhawm rau ua kom tiav cov txheej txheem no (20 Teev) yog li mob siab rau & nyob ntsiag to.

3. Nruab PCM9685 lub tsev qiv ntawv ntawm Raspberry PI.

a Cov ntaub ntawv siv:-https://learn.adafruit.com/adafruit-16-channel-servo-driver-with-raspberry-pi?view=all

b. Txheeb xyuas PCM9685 i2c txuas nrog RPI

kuv. Khiav:-sudo apt-tau nruab python-smbus

ii. Khiav:-sudo apt-tau nruab i2c-cuab yeej

iii. Khiav: - sudo i2cdetect -y 1

1. Duab ntawm kev sib txuas lus tau zoo nrog PCM9685

c. Qhib Terminal & khiav: - qhov chaw ~/.profile #nkag mus rau hauv ib puag ncig virtual.

d. Qhib Terminal & khiav:-pip3 nruab adafruit-circuitpython-servokit

e. Tsis txhob Siv "sudo" tsis li koj yuav ntsib teeb meem vim siv "sudo" yuav tsis nruab tsev qiv ntawv hauv koj qhov chaw ib puag ncig.

f. Txheeb xyuas servo

kuv. Qhib nab hab sej 3 & nkag rau hauv qab cov lus txib.

ii. los ntawm adafruit_servokit ntshuam ServoKit

iii. kit = ServoKit (raws = 16)

ib iv. kit.servo [0].angle = 90

v. kit.servo [0].angle = 180

ua vi. kit.servo [0].angle = 0

4. Kev Txuas Txuas:-

a Txuas 5VDC rau PCM9685 (Rau Kev Ua Haujlwm Sab Nraud 5V xav tau)

b. / Txuas PC9685 I2C & logic muab pins nrog RPI pins.

c. Txuas Ob Qhov Servo rau PCM9685

5. Tshawb xyuas servo

a Kuv tau npaj 4 cov ntaub ntawv rau kev kuaj xyuas servo (180.py, 90.py, 0.py).

kuv. Rau 0 degree. (Ob qho Servo ntawm 0 degree).

ii. Rau 90 degree. (Ob qho Servo ntawm 90 degree).

iii. Rau 180 degree. (Ob qho Servo ntawm 180 degree).

ib iv. Qhov chaws ()

6. Nruab PI lub koob yees duab ntawm lub koob yees duab txuas & mount servo raws li piav qhia hauv video qhia.

a Tutorial URL:-

7. Khiav cov khoom taug qab tus lej (rub tawm los ntawm:-)

8. Qhib Terminal

a Khiav: - qhov chaw ~/.profile.

b. Khiav: - ua haujlwm cv.

c. Kos "(CV)" nyob rau hauv pem hauv ntej ntawm lub davhlau ya nyob twg hais kom ua.

d. Khiav Object Object tracking Code:- 'txoj hauv kev ntawm koj cov ntaub ntawv qhov chaw'/python3.'file name '

e. Txhawm rau tawm xovxwm:- Esc

Kauj Ruam 1: Ua Haujlwm ntawm Txoj Haujlwm:-

  1. Duab ntes los ntawm RPI Lub Koob Yees Duab thiab ua tiav hauv nab nab siv openCV.
  2. Cov duab ntes tau hloov pauv los ntawm RGB mus rau HSV.
  3. Thov daim npog qhov ncauj rau xim tshwj xeeb (hauv kuv tus lej kawg kuv siv RED xim & tshwj xeeb cov cai tau siv los nrhiav qhov ncauj qhov ncauj qhov tseeb uas tseem tau txuas nrog hnov)
  4. Nrhiav Contours rau txhua yam khoom liab hauv kab.
  5. Thaum kawg txheeb thiab xaiv thawj Contours yuav muab cov khoom liab bogest hauv kab.
  6. Kos duab plaub rau ntawm yam khoom thiab nrhiav kab rov tav & ntsug nruab nrab ntawm lub duab plaub.
  7. Txheeb xyuas qhov sib txawv ntawm Frame kab rov tav nruab nrab thiab cov khoom sib dhos kab rov tav nruab nrab.
  8. Yog tias qhov sib txawv ntau dua tom qab teeb tsa tus nqi ces pib txav Horizontal servo kom txo qhov sib txawv.
  9. Tib txoj kev uas peb tuaj yeem txav mus rau txoj kab ntsug thiab thaum kawg cov khoom taug qab tau ua haujlwm rau 180 Degree.

Kauj Ruam 2: Npaj RPI:- Teeb Qhia Lub Sijhawm Yog:- 15:10 txog 16:42 hauv Youtube Video

Rub Raspbian Streach thiab nqaij nws ntawm 32 GB nco daim npav. URL: -https://downloads.raspberrypi.org/raspbian_full_latest.

Tom qab rub tawm Raspbian duab, unzip nws thiab khaws rau ntawm lub desktop (lossis qhov chaw haum).

Txhawm rau sau daim duab ntawm SD daim npav, rub tawm Eatcher.

Qhov URL:

Txuas HDMI rau VGA cable rau hauv RPI thiab LCD saib.

Txuas USB Keyboard thiab Mouse thiab txhawb nqa PI siv lub zog hloov pauv (2.5 amp.)

Pom zoo: