Cov txheej txheem:
- Kauj ruam 1: Cov ntaub ntawv
- Kauj Ruam 2: Sib Sau Ua Ke
- Kauj ruam 3: Coding Nano
- Kauj Ruam 4: Txhim Kho Qhov Chaw ntawm Mio
Video: Bluetooth Neeg Hlau Mio: 4 Kauj Ruam
2024 Tus sau: John Day | [email protected]. Kawg hloov kho: 2024-01-30 09:25
Kauj ruam 1: Cov ntaub ntawv
1- Neeg Hlau Mio
2- L298N Voltage Regulator Dual Tsav Tsav Tsav
3- Arduino Nano
4- HC06 Bluetooth-Serial Module Board
5- (2x) 9 V Roj Teeb Lub taub hau
Kauj Ruam 2: Sib Sau Ua Ke
Cia peb pib nrog cov tsav tsheb sib txuas ua ntej Cia peb txuas cov hlua txuas hauv qab hauv 1, in2, in3, in4 pins ntawm tus tsav tsheb. (raws li daim duab 1) Tom qab ntawd cia peb xaim cable hauv in1 rau nano tus d6 tus pin, in2 rau d10 tus pin, in3 rau d5 tus pin, thiab thaum kawg lub cable hauv in4 rau d9 tus pin. (zoo li hauv daim duab 2) Tam sim no, cia ua qhov txuas ntawm peb HC06 module, cia xaim RXD tus pin rau TXD tus pin ntawm nano, TXD tus pin rau RXD tus pin, VCC thiab GND pins rau ib qho 5v thiab GND pins ntawm nano. (raws li pic3) Thiab thaum kawg, cia ua lub cav sib txuas. Thaum Mio tab tom ntsib peb, cia peb txuas txoj kab hluav taws xob zoo mus rau qhov tawm 3, 4 tus pin ntawm tus tsav tsheb thiab sab laug lub cev muaj zog txuas mus rau out1, 2 tus pin. tus nano thiab cov hlua dub rau GND tus pin. (raws li daim duab 4) Thiab cia peb txiav lub jumper hlau nyob hauv nruab nrab, hle qhov kawg thiab txuas nws mus rau GND tus pin ntawm nano, mus rau GND tus pin ntawm tus tsav tsheb. (raws li daim duab 5, 6) Cia peb txuas kab liab liab ntawm lwm 9v lub taub hau roj teeb mus rau 12v tus pin thiab cov hlua dub rau tus pin gnd ntawm tus tsav tsheb lub zog tsav. (raws li hauv daim duab 7)
Kauj ruam 3: Coding Nano
const int motorA1 = 5; // L298N'in IN3 Girişi
const int motorA2 = 6; // L298N'in IN1 Girişi const int motorB1 = 10; // L298N'in IN2 Girişi const int motorB2 = 9; // L298N'in IN4 Girişi
int ib = 0; // Döngüler için atanan rastgele bir değişken int j = 0; // Lub tsev kawm ntawv qib siab lossis tsev kawm qib siab; // Bluetooth cihazından gelecek sinyalin değişkeni int vSpeed = 255; // Standart Hız, 0-255 arası bir değer alabilir
void teeb () {// Pinlerimizi belirleyelim pinMode (motorA1, OUTPUT); pinMode (motorA2, OUTPUT); pinMode (motorB1, OUTPUT); tus pinMode (motorB2, OUTPUT); // 9600 baud hızında bir seri chaw nres nkoj açalım Serial.begin (9600); } void loop () {// Bluetooth bağlantısı koptuğunda veya kesildiğinde arabayı durdur. // (Aktif etmek için alt satırın "//" larını kaldırın.) // yog (digitalRead (BTState) == LOW) {xeev = 'S'; }
// Gelen veriyi 'xeev' değişkenine kaydet yog (Serial.available ()> 0) {state = Serial.read (); } // Uygulamadan ayarlanabilen 4 hız seviyesi. (Değerler 0-255 arasında olmalı) yog (xeev == '0') {vSpeed = 0;} ntxiv yog (xeev == '1') {vSpeed = 100;} ntxiv yog (xeev == '2') {vSpeed = 180;} lwm qhov yog (xeev == '3') {vSpeed = 200;} lwm qhov yog (xeev == '4') {vSpeed = 255;} /*** **************************************************************************************/ // Gelen veri 'F' ise araba ileri gider. yog (xeev == 'F') {analogWrite (motorA1, vSpeed); analogWrite (motorA2, 0); analogWrite (motorB1, vSpeed); analogWrite (motorB2, 0); } /********************** İleri Sol ************************ /// Gelen veri 'G' ise araba ileri sol (çapraz) gider. lwm yog (xeev == 'G') {analogWrite (motorA1, vSpeed); analogWrite (motorA2, 0); analogWrite (motorB1, 100); analogWrite (motorB2, 0); } /********************** İleri Sağ ************************ /// Gelen veri 'Kuv' ise araba ileri sağ (çapraz) gider. lwm yog (xeev == 'Kuv') {analogWrite (motorA1, 100); analogWrite (motorA2, 0); analogWrite (motorB1, vSpeed); analogWrite (motorB2, 0); } /*********************** Geri ************************ ****/// Gelen veri 'B' ise araba geri gider. lwm yog (xeev == 'B') {analogWrite (motorA1, 0); analogWrite (motorA2, vSpeed); analogWrite (motorB1, 0); analogWrite (motorB2, vSpeed); } /********************** Geri Sol ************************ /// Gelen veri 'H' ise araba geri sol (çapraz) gider lwm tus yog (xeev == 'H') {} /********************* *Geri Sağ ************************/// Gelen veri 'J' ise araba geri sağ (çapraz) gider lwm tus yog (xeev == ' J ') {analogWrite (motorA1, 0); analogWrite (motorA2, vSpeed); analogWrite (motorB1, 0); analogWrite (motorB2, 100); } /*************************** Sol ******************** *********/// Gelen veri 'L' ise araba sola gider. lwm yog (xeev == 'L') {analogWrite (motorA1, vSpeed); analogWrite (motorA2, 150); analogWrite (motorB1, 0); analogWrite (motorB2, 0); } /*************************** Sağ ******************** *********/// Gelen veri 'R' ise araba sağa gider lwm tus yog (xeev == 'R') {analogWrite (motorA1, 0); analogWrite (motorA2, 0); analogWrite (motorB1, vSpeed); analogWrite (motorB2, 150); } /************************ Nres *********************** ******/// Gelen veri 'S' ise arabayı durdur. lwm yog (xeev == 'S') {analogWrite (motorA1, 0); analogWrite (motorA2, 0); analogWrite (motorB1, 0); analogWrite (motorB2, 0); }} analogWrite (motorA1, 0); analogWrite (motorA2, 100); analogWrite (motorB1, 0); analogWrite (motorB2, vSpeed);
Kauj Ruam 4: Txhim Kho Qhov Chaw ntawm Mio
Tam sim no peb nyob rau theem kawg los koom ua ke mio neeg hlau
Pom zoo:
DIY Neeg Hlau - Kev Kawm 6 Axis Neeg Hlau Caj Npab: 6 Kauj Ruam (nrog Duab)
DIY Neeg Hlau | Kev Kawm 6 Axis Neeg Hlau Caj Npab: DIY-Robotics kev kawm ntawm tes yog lub platform uas suav nrog 6-axis neeg hlau sab caj npab, hluav taws xob tswj hluav taws xob thiab software software. Lub platform no yog qhia txog lub ntiaj teb kev lag luam neeg hlau. Los ntawm txoj haujlwm no, DIY-Robotics xav tau
RC Tswj Neeg Hlau ntawm XLR8! Kev Kawm Neeg Hlau: 5 Kauj Ruam
RC Tswj Neeg Hlau ntawm XLR8! Kev Kawm Neeg Hlau: Nyob zoo, hauv kab lus no, yuav qhia koj yuav tsim lub hauv paus neeg hlau li cas. Lo lus "Neeg Hlau" txhais tau tias yog "Qhev" los yog "Laborer". Ua tsaug rau kev nce qib hauv Kev Txawj Ntse, neeg hlau tsis yog ib feem ntawm Issac Asimov's Sci-Fi
Neeg Hlau Neeg Hlau Gripper: 9 Kauj Ruam
Cov Neeg Siv Khoom Siv Hluav Taws Xob: Cov teb ntawm cov neeg hlau mos (cov neeg hlau ua los ntawm cov ntaub ntawv mos xws li silicons thiab rubbers) tau loj hlob sai heev nyob rau xyoo tas los no. Cov neeg hlau muag muag tuaj yeem muaj txiaj ntsig zoo hauv kev sib piv rau lawv cov neeg sib zog vim tias lawv yoog raws
Ntsuas Neeg Hlau / 3 Log Neeg Hlau / STEM Neeg Hlau: 8 Kauj Ruam
Ntsuas Cov Neeg Hlau / 3 Log Neeg Hlau / STEM Neeg Hlau: Peb tau tsim ua ke sib npaug thiab 3 lub log neeg hlau rau kev kawm siv hauv tsev kawm ntawv thiab tom qab kawm ntawv cov haujlwm. Tus neeg hlau yog ua raws Arduino Uno, tus tiv thaiv kev tiv thaiv (txhua qhov kev tsim kho cov ntsiab lus muab), Li -Ion roj teeb pob (txhua qhov tsim tawm
Ib txoj hauv kev yooj yim dua los Siv Cov Hlau Hlau Hlau Hlau rau SMD LEDs: 5 Kauj Ruam
Ib txoj hauv kev yooj yim dua los Siv Cov Hlau Hlau Hlau Hlau rau SMD LEDs: Cov lus qhia no piav qhia txoj hauv kev yooj yim dua ntawm kev txuas cov hlau nplaum hlau zoo rau saum npoo LEDs. Nws yog nyob rau hauv cov lus teb rau lub Rag ntawm Fireflies qhia uas qhia pom siv "pab txhais tes" clip los ua txoj haujlwm no. Kuv xav tias kuv txoj kev yooj yim dua