Cov txheej txheem:
- Kauj Ruam 1: Lub Thawv Dub
- Kauj ruam 2: Arduino
- Kauj Ruam 3: Txuas Arduino rau Blackbox
- Kauj Ruam 4: Ultrasonic Sensor
- Kauj Ruam 5: Breadboard Kev Sib Txuas ntawm Sensor rau Arduino
- Kauj Ruam 6: Tsav Tsheb
- Kauj Ruam 7: Txuas Lub Tshuab Tsav Tsheb mus rau Arduino
- Kauj Ruam 8: Txuas 4 Lub Tshuab Hluav Taws Xob thiab Roj Teeb rau Shield
- Kauj Ruam 9: Program Robot
Video: Kev Nyuaj Siab Zam Tsis Siv Neeg Tsheb Tsheb: 9 Kauj Ruam
2024 Tus sau: John Day | [email protected]. Kawg hloov kho: 2024-01-30 09:26
Yuav Ua Li Cas Tsim Kom Muaj Kev Nyuaj Siab Zaum Tsis Siv Neeg
Kauj Ruam 1: Lub Thawv Dub
thawj kauj ruam kuv siv lub thawv dub ua lub hauv paus rau kuv tus neeg hlau.
Kauj ruam 2: Arduino
Arduino yog lub hlwb ntawm tag nrho cov kab ke thiab tsim kho peb cov tshuab
Kauj Ruam 3: Txuas Arduino rau Blackbox
Kuv txuas cov arduino rau lub blackbox siv cov kua nplaum kub
Kauj Ruam 4: Ultrasonic Sensor
Txhawm rau ua tus neeg hlau uas tuaj yeem txav tau los ntawm nws tus kheej peb xav tau qee yam ntawm cov tswv yim, lub ntsuas uas haum rau peb lub hom phiaj. Lub ntsuas hluav taws xob ultrasonic yog ntsuas uas ntsuas qhov nrug deb ntawm ib qho khoom siv siv lub suab tsis zoo. Ib qho ultrasonic sensor siv tus hloov pauv xa thiab tau txais ultrasonic pulses uas xa rov qab cov ntaub ntawv hais txog qhov khoom nyob ze
Kauj Ruam 5: Breadboard Kev Sib Txuas ntawm Sensor rau Arduino
Kuv siv cov xov hlau rau txiv neej kev sib txuas ntawm lub khob cij thiab arduino.
Ua tib zoo saib tias koj lub ping sensor yuav muaj tus lej sib txawv tab sis nws yuav tsum muaj tus pin voltage, tus pin hauv av, tus lej pin thiab tus echo pin.
Kauj Ruam 6: Tsav Tsheb
Arduino cov laug cam tsis tuaj yeem tswj lub tshuab hluav taws xob dc los ntawm lawv tus kheej, vim tias cov hluav taws xob uas lawv tsim tawm qis dhau. Txhawm rau daws qhov teeb meem no peb siv lub tshuab tiv thaiv lub cev. Qhov tiv thaiv lub cev muaj 2 txoj hauv kev, uas tso cai rau kev tswj ntawm ob lub DC motors, lossis 1 stepper tsav. … Los ntawm kev hais qhia cov pins no koj tuaj yeem xaiv lub cav kom pib, qhia lub zog tsav (kev sib txhuam), teeb tsa lub cev muaj zog (PWM), nres thiab pib lub cav, thiab saib xyuas qhov nqus tam sim no ntawm txhua cov channel
Kauj Ruam 7: Txuas Lub Tshuab Tsav Tsheb mus rau Arduino
Cias txuas daim ntawv tsav tsheb mus rau arduino nrog lub xov tooj cua sensor tawg hauv
Kauj Ruam 8: Txuas 4 Lub Tshuab Hluav Taws Xob thiab Roj Teeb rau Shield
Txhua Lub Tshuab Tsav Tsheb muaj (tsawg kawg) ob txoj hauv kev, ib qho rau lub cav, thiab ib qho rau lub zog siv, Txuas lawv nrog kev sib hwm
Kauj Ruam 9: Program Robot
khiav cov cai no
#ncig #ncig
NewPing sonar (TRIG_PIN, ECHO_PIN, MAX_DISTANCE);
AF_DCMotor motor1 (1, MOTOR12_1KHZ); AF_DCMotor motor2 (2, MOTOR12_1KHZ); AF_DCMotor motor3 (3, MOTOR34_1KHZ); AF_DCMotor motor4 (4, MOTOR34_1KHZ); Servo tswj;
#define TRIG_PIN A2 #define ECHO_PIN A3 #define MAX_DISTANCE 150 #define MAX_SPEED 100 #define MAX_SPEED_OFFSET 10
boolean GoForward = tsis tseeb; int nrug = 80; int speedSet = 0;
void teeb tsa () {
myservo.attach (10); myservo.write (115); ncua (2000); nrug = readPing (); ncua (100); nrug = readPing (); ncua (100); nrug = readPing (); ncua (100); nrug = readPing (); ncua (100); }
void loop () {int nrug R = 0; int nrug L = 0; ncua (40); yog (nrug <= 15) {moveStop (); ncua (50); moveBackward (); ncua (150); moveStop (); ncua (100); nrugR = lookRight (); ncua (100); distanceL = saibLeft (); ncua (100);
yog (nrug R> = nrug L) {tig rov qab (); moveStop (); } lwm {turnLeft (); moveStop (); }} lwm tus {moveForward (); } nrug = readPing (); }
int saibRight () {myservo.write (50); ncua (250); int nrug = readPing (); ncua (50); myservo.write (100); rov nrug deb; }
int saibLeft () {myservo.write (120); ncua (300); int nrug = readPing (); ncua (100); myservo.write (115); rov nrug deb; ncua (100); }
int readPing () {ncua (70); int cm = sonar.ping_cm (); yog (cm == 0) {cm = 200; } rov cm; }
tsis muaj dabtsis moveStop () {motor1.run (tso tawm); motor2.run (tso tawm); motor3.run (tso tawm); motor4.run (tso tawm); } tsis muaj dabtsis moveForward () {
yog (! goForward) {goForward = muaj tseeb; motor1.run (FORWARD); motor2.run (FORWARD); motor3.run (FORWARD); motor4.run (FORWARD); rau (speedSet = 0; speedSet <MAX_SPEED; speedSet += 2) {motor1.setSpeed (speedSet); motor2.setSpeed (speedSet); motor3.setSpeed (speedSet); motor4.setSpeed (speedSet); ncua (5); }}}
void moveBackward () {goForward = tsis tseeb; motor1.run (rov qab); motor2.run (rov qab); motor3.run (rov qab); motor4.run (rov qab); rau (speedSet = 0; speedSet <MAX_SPEED; speedSet += 2) {motor1.setSpeed (speedSet); motor2.setSpeed (speedSet); motor3.setSpeed (speedSet); motor4.setSpeed (speedSet); ncua (5); } void turnLeft () {motor1.run (BACKWARD); motor2.run (rov qab); motor3.run (FORWARD); motor4.run (FORWARD); ncua (500); motor1.run (FORWARD); motor2.run (FORWARD); motor3.run (FORWARD); motor4.run (FORWARD); }
void turnLeft () {motor1.run (BACKWARD); motor2.run (rov qab); motor3.run (FORWARD); motor4.run (FORWARD); ncua (500); motor1.run (FORWARD); motor2.run (FORWARD); motor3.run (FORWARD); motor4.run (FORWARD); }
Pom zoo:
OAREE - 3D Luam Tawm - Kev Nyuaj Siab Zam Txim Rau Neeg Hlau rau Kev Kawm Txuj Ci (OAREE) Nrog Arduino: 5 Kauj Ruam (nrog Duab)
OAREE - 3D Luam - Obstacle Zam Txim Rau Neeg Hlau rau Kev Kawm Txuj Ci (OAREE) Nrog Arduino: OAREE (Obstacle Zam Zam Txim Rau Neeg Hlau rau Kev Kawm Txuj Ci) Tsim: Lub hom phiaj ntawm cov lus qhia no yog tsim OAR (Obstacle Zam Txim Neeg Hlau) neeg hlau uas yooj yim/compact, 3D luam tawm, yooj yim rau sib sau ua ke, siv kev sib hloov ua haujlwm tsis tu ncua rau kev txav chaw
Arduino Neeg Hlau Nrog Kev Nyob, Kev Qhia thiab Qib Kev Sib Hloov (Sab Hnub Poob, Sab Hnub Poob, Sab Qaum Teb, Sab Qab Teb) Tswj los ntawm Lub Suab Siv Bluetooth Module thiab Kev Siv Tus Neeg Siv Hluav Taws Xob: 6 Kauj Ruam
Arduino Neeg Hlau Nrog Kev Nyob, Kev Qhia thiab Qib Kev Sib Hloov (Sab Hnub Poob, Sab Hnub Poob, Sab Qaum Teb, Sab Qab Teb) Tswj los ntawm Lub Suab Siv Bluetooth Module thiab Kev Siv Tus Neeg Siv Hluav Taws Xob: Cov lus qhia no piav qhia yuav ua li cas thiaj tsim tau Arduino Robot uas tuaj yeem txav mus raws qhov xav tau (Forward, Backward) , Sab laug, Txoj Cai, Sab Hnub Poob, Sab Hnub Poob, Sab Qaum Teb, Sab Qab Teb) xav tau Kev nrug deb hauv Centimeters siv lub suab hais kom ua. Neeg hlau kuj tseem tuaj yeem txav tau tus kheej
Kev Nyuaj Siab Zam Txim Neeg Hlau Siv Ultrasonic Sensors: 9 Kauj Ruam (nrog Duab)
Obstacle Zam Tsis Siv Neeg Siv Ultrasonic Sensors: Qhov no yog txoj haujlwm yooj yim hais txog Obstacle Zam Txim Neeg Hlau siv Ultrasonic sensors (HC SR 04) thiab Arduino Uno board. qhia qhov project, qhia rau koj
Kev Nyuaj Siab Zam Zam Kev Ua Si Nrog Qhov Tseeb Sensor: 5 Kauj Ruam
Kev Nyuaj Siab Zam Kev Ua Si Nrog Kev Pom Zoo Nyob Ze: Cov kev ua si zam kev cuam tshuam zoo li Flappy Bird. Tsiv koj txhais tes kom tsis txhob muaj kev sib tsoo. Nws yog ib qho yooj yim ua thiab lom zem ua si
Kev Nyuaj Siab Zam Tsis Siv Neeg Siv L298n Tsav Tsheb: 5 Kauj Ruam
Obstacle Zam Tsis Siv Neeg Siv L298n Tsav Tsheb: nyob zoo cov neeg niaj hnub no peb yuav ua qhov no .. vam tias koj txaus siab rau nws