Cov txheej txheem:

Arduino Tutorial - Servo Tsav Tswj Nrog Joystick: 4 Cov Kauj Ruam
Arduino Tutorial - Servo Tsav Tswj Nrog Joystick: 4 Cov Kauj Ruam

Video: Arduino Tutorial - Servo Tsav Tswj Nrog Joystick: 4 Cov Kauj Ruam

Video: Arduino Tutorial - Servo Tsav Tswj Nrog Joystick: 4 Cov Kauj Ruam
Video: Уроки Arduino - управление сервомашинкой 2024, Kaum ib hlis
Anonim
Image
Image

Hauv qhov kev qhia no, peb yuav kawm paub siv servo nrog Joystick li cas. Peb yuav tswj 1 pcs servo motor nrog 1 Joystick.

Koj tuaj yeem siv koj cov phiaj xwm phiaj xwm sab caj npab nrog siv rau qhov kev qhia no. Tau kawg peb yuav siv roj teeb sab nraud / lub zog thaum ua qhov no. Hauv qhov kev qhia tom ntej, Kuv yuav qhia koj yuav ua li cas tswj ntau servos tswj nrog Android Daim Ntawv Thov ntawm Bluetooth. Tsis txhob hnov qab sau npe yuav. Ua tsaug rau koj kev txhawb nqa.

Kauj ruam 1: Yuav tsum kho vajtse

Code
Code

Pawg Arduino

Servo Tsav

Joystick Module

Hlau

Cov qhob cij

Kauj ruam 2: Kev sib txuas

Lub roj teeb sab nraud VCC / GND txuas rau lub khob cij.

- Arduino GND txuas rau lub khob cij lub GND cov tswv yim

- Cov kev sib txuas servo peb siv hauv txoj haujlwm no yog raws li hauv qab no;

* Txiv kab ntxwv tawm tswv yim - Teeb liab tawm tswv yim

* Liab tawm tswv yim - Fais fab tswv yim (VCC)

* Cov tswv yim xim av - Cov tswv yim hauv av (GND)

- Qhov Servo1 VCC thiab GND txuas rau lub khob cij lub VCC / GND cov tswv yim

- Qhov Servo1 Signal txuas rau Arduino Digital PWM 3

- Cov joystick txuas peb siv hauv txoj haujlwm no yog raws li hauv qab no;

* Tus Joystick GND txuas rau Arduino GND

*Tus Joystick VCC txuas rau Arduino VCC

* Tus Joystick 'X' (hauv qee qhov qauv 'H') txuas rau Arduino Analog 0

* Tus Joystick 'Y' (hauv qee qhov qauv 'V') txuas rau Arduino Analog 1

* Lub Joystick 'SW' (hloov lossis khawm) tsis txuas nrog.

Txog Joystick Module:

2 x 5K Potentiometers rau nyeem X thiab Y txoj haujlwm

1 x Qhib Qhib Momentary Hloov

Yooj yim 5 tus pin +5Vcc - GND - VRx - VRy - SW

Kauj ruam 3: Code

Kuv tsis tau qhia cov cai vim tias nws luv thiab nws txawv raws li tus naj npawb ntawm servo.

Koj tuaj yeem sau cov cai los ntawm saib cov lus qhia. Nov yog txoj hauv kev zoo dua los kawm. Kuv yuav txuas ntxiv qhia cov lej ntev thiab nyuaj.

Kauj Ruam 4: Yog Kuv Pab Tau

Yog Kuv Pab Tau
Yog Kuv Pab Tau
Yog Kuv Pab Tau
Yog Kuv Pab Tau

Ua ntej tshaj plaws, Kuv xav ua tsaug rau koj tau nyeem phau ntawv qhia no! Kuv vam tias nws yuav pab koj.

Yog tias koj xav txhawb nqa kuv, koj tuaj yeem sau npe yuav kuv channel thiab saib kuv cov vis dis aus.

Mus ntsib kuv tus YouTube Channel

Pom zoo: