Cov txheej txheem:
Video: Yuav Ua Li Cas Tib Neeg Ua Raws Li Neeg Hlau Nrog Arduino: 3 Kauj Ruam
2024 Tus sau: John Day | [email protected]. Kawg hloov kho: 2024-01-30 09:25
Tib neeg ua raws kev nkag siab neeg hlau thiab ua raws tib neeg
Kauj Ruam 1: Tau Txais Cov Cuab Yeej
Tau txais cov cuab yeej zoo li: Ultrasonic sensorSensorArduino uno 4 gear motors nrog lub logServo Roj teeb thiab roj teeb rooj plaub Lub cev tsav tsheb Jumper xov hlau Chassis
Kauj ruam 2: Txuas
Txuas txhua yam khoom siv rau tus tsav tsheb. Txuas tus tsav tsheb mus rau arduino.
Kauj ruam 3: Code
#suav nrog#suav nrog#suav nrog RIGHT A2#txhais LEFT A3#txhais TRIGGER_PIN A1#txhais ECHO_PIN A0#txhais MAX_DISTANCE 100NewPing sonar (TRIGGER_PIN, ECHO_PIN, MAX_DISTANCE); AF_DCMotor Motor1 (1, MOTOR12K); AF_DCMotor Motor1 (1, MOTOR12_1); AF_DCMotor Motor3 (3, MOTOR34_1KHZ); AF_DCMotor Motor4 (4, MOTOR34_1KHZ); Servo myservo; int pos = 0; void setup () {// put your setup code here, to run once: Serial.begin (9600); myservo.attach (10); {rau (pos = 90; pos <= 180; pos += 1) {myservo.write (pos); ncua (15);} rau (pos = 180; pos> = 0; pos- = 1) {myservo.write (pos); ncua (15);} rau (pos = 0; pos <= 90; pos += 1) {myservo.write (pos); ncua (15);}} pinMode (RIGHT, INPUT); pinMode (LEFT, INPUT);} void loop () {// tso koj tus lej tseem ceeb ntawm no, kom rov ua dua: ncua (50); unsigned int nrug = sonar.ping_cm (); Serial.print ("nrug"); Serial.println (nrug); int Right_Value = digitalRead (RIGHT); int Left_Value = digitalRead (LEFT); Serial.print ("RIGHT"); Serial.println (Right_Value); Serial.print ("LEFT"); Serial.println (Left_Value); yog ((Right_Value == 1) && (nrug> = 10 && nrug <= 30) && (Left_Value == 1)) {Motor1.setSpeed (120); Motor1.run (FORWARD); Motor2.setSpeed (120); Motor2.run (FORWARD); Motor3.setSpeed (120); Motor3.run (FORWARD); Motor4.setSpeed (120); Motor4.run (FORWARD);} ntxiv yog ((Right_Value == 0) && (Left_Value == 1)) {Motor1.setSpeed (200); Motor1.run (FORWARD); Motor2.setSpeed (200); Motor2.run (FORWARD); Motor3.setSpeed (100); Motor3.run (rov qab); Motor4.setSpeed (100); Motor4.run (BACKWARD);} ntxiv yog ((Right_Value == 1) && (Left_Value == 0)) {Motor1.setSpeed (100); Motor1.run (rov qab); Motor2.setSpeed (100); Motor2.run (rov qab); Motor3.setSpeed (200); Motor3.run (FORWARD); Motor4.setSpeed (200); Motor4.run (FORWARD);} lwm tus yog ((Right_Value == 1) && (Left_Value == 1)) {Motor1.setSpeed (0); Motor1.run (tso tawm); Motor2.setSpeed (0); Motor2.run (tso tawm); Motor3.setSpeed (0); Motor3.run (tso tawm); Motor4.setSpeed (0); Motor4.run (tso tawm);} lwm qhov yog (nrug> 1 && nrug <10) {Motor1.setSpeed (0); Motor1.run (tso tawm); Motor2.setSpeed (0); Motor2.run (tso tawm); Motor3.setSpeed (0); Motor3.run (tso tawm); Motor4.setSpeed (0); Motor4.run (tso tawm); }}
Pom zoo:
Tib Neeg Ua Raws Neeg Hlau Siv Arduino Uno qis dua 20 $: 9 Cov Kauj Ruam
Tib Neeg Ua Raws Cov Neeg Hlau Siv Arduino Uno Hauv qab $ 20: yog li kuv tau ua tus neeg hlau no txog ib xyoos dhau los thiab kuv nyiam nws nws tuaj yeem ua raws koj nyob txhua qhov chaw thiab txhua qhov chaw. qhov no yog lwm txoj hauv kev zoo tshaj rau tus dev. nws tseem nrog kuv txog tam sim no. Kuv kuj muaj youtube channel uas koj tuaj yeem pom cov txheej txheem ntawm kev ua nws hauv vi
Yuav Ua Li Cas Ua Tib Neeg Tib Neeg: 8 Kauj Ruam
Yuav Ua Li Cas Ua Tib Neeg Tus Neeg Hlau: Hav guys! Kuv vam tias koj twb nyiam kuv cov lus qhia yav dhau los " Online Weather Station (NodeMCU) " thiab koj tau npaj rau qhov tshiab, Tom qab SMARS tus qauv neeg hlau uas peb tau sib sau zaum kawg, hnub no txoj haujlwm, tseem hais txog kev kawm neeg hlau thiab
Arduino Raws Li Tib Neeg Cov Neeg Hlau Siv Servo Motors: 7 Kauj Ruam (nrog Duab)
Arduino Raws Humanoid Robot Siv Servo Motors: Nyob zoo txhua tus, Qhov no yog kuv thawj tus tib neeg uas tsis yog neeg hlau, ua los ntawm PVC ua npuas ncauj ntawv. Nws muaj nyob hauv ntau yam tuab. Ntawm no, Kuv siv 0.5mm. Tam sim no tus neeg hlau no tuaj yeem taug kev thaum kuv hloov ON. Tam sim no kuv tab tom ua haujlwm txuas Arduino thiab Txawb los ntawm Bluetooth
[Arduino Robot] Yuav Ua Li Cas Ua Lub Suab Ntaus Neeg Hlau - Thumbs Neeg Hlau - Servo Tsav - Source Code: 26 Cov Kauj Ruam (nrog Duab)
[Arduino Robot] Yuav Ua Li Cas Ua Lub Suab Ntaus Neeg Hlau | Thumbs Neeg Hlau | Servo Tsav | Source Code: Thumbs Neeg Hlau. Siv lub hwj chim ntawm MG90S servo motor. Nws lom zem heev thiab yooj yim! Cov cai yog yooj yim heev. Nws tsuas yog nyob ib ncig ntawm 30 kab. Nws zoo li lub suab ntes.Please tawm ib lo lus nug lossis lus teb! [Qhia] Source Code https: //github.c
Ib qho yooj yim heev/yooj yim/Tsis yooj yim txoj hauv kev kom tib neeg/tib neeg/tsiaj/neeg hlau zoo li lawv muaj txias tiag tiag/Lub zeem muag tshav kub kub (Xim ntawm Koj Xaiv) Siv GIMP: 4 Cov Kauj Ruam
Ib qho yooj yim heev/yooj yim/Tsis yooj yim txoj hauv kev kom tib neeg/tib neeg/tsiaj/neeg hlau zoo li lawv muaj txias tiag tiag/Lub zeem muag tshav kub kub (Xim ntawm Koj Xaiv) Siv GIMP: Nyeem … lub npe