{"id":480,"date":"2026-06-11T10:44:52","date_gmt":"2026-06-11T02:44:52","guid":{"rendered":"https:\/\/projectleon.net\/make\/blog\/ugv-4wd-esp32-bluetooth-joystick-control-farsi\/"},"modified":"2026-06-11T10:44:52","modified_gmt":"2026-06-11T02:44:52","slug":"ugv-4wd-esp32-bluetooth-joystick-control-farsi","status":"publish","type":"post","link":"https:\/\/projectleon.net\/make\/blog\/ugv-4wd-esp32-bluetooth-joystick-control-farsi\/","title":{"rendered":"\u0633\u0627\u062e\u062a \u0631\u0628\u0627\u062a UGV \u0686\u0647\u0627\u0631\u0686\u0631\u062e \u0628\u0627 ESP32 \u0648 \u06a9\u0646\u062a\u0631\u0644 Joystick Bluetooth (\u0641\u0627\u0631\u0633\u06cc)"},"content":{"rendered":"<div class='hero-image-container' style='margin-bottom:28px;border-radius:14px;overflow:hidden;box-shadow:0 4px 18px rgba(0,0,0,0.08)'>\n<img src='https:\/\/projectleon.net\/make\/wp-content\/uploads\/2026\/06\/post57-ugv-bt-joystick.jpg' alt='\u0631\u0628\u0627\u062a UGV 4WD ESP32 Bluetooth Joystick' style='width:100%;height:auto;display:block' loading='eager'\/>\n<\/div>\n<div class='beginner-intro' style='background:#f0f7ff;border-right:4px solid #2e5fb6;padding:16px 20px;border-radius:10px;margin-bottom:22px'>\n<h2 style='margin-top:0'>UGV \u0628\u0627 Bluetooth \u0686\u06cc\u0633\u062a\u061f (\u0628\u0631\u0627\u06cc \u0645\u0628\u062a\u062f\u06cc)<\/h2>\n<p><strong>UGV<\/strong> (Unmanned Ground Vehicle) \u06cc\u06a9 \u0648\u0633\u06cc\u0644\u0647 \u0646\u0642\u0644\u06cc\u0647 \u0632\u0645\u06cc\u0646\u06cc \u0628\u062f\u0648\u0646 \u0631\u0627\u0646\u0646\u062f\u0647 \u0627\u0633\u062a. \u062f\u0631 \u0627\u06cc\u0646 \u067e\u0631\u0648\u0698\u0647 \u0645\u0627 \u06cc\u06a9 UGV 4WD (\u0686\u0647\u0627\u0631\u0686\u0631\u062e \u0645\u062d\u0631\u06a9) \u0645\u06cc\u200c\u0633\u0627\u0632\u06cc\u0645 \u06a9\u0647 \u0628\u0627 <strong>Bluetooth Classic<\/strong> \u0627\u0632 \u06af\u0648\u0634\u06cc Android \u06a9\u0646\u062a\u0631\u0644 \u0645\u06cc\u200c\u0634\u0648\u062f.<\/p>\n<p><strong>ESP32<\/strong> \u062f\u0627\u0631\u0627\u06cc Bluetooth 4.2 (Classic + BLE) \u062f\u0627\u062e\u0644\u06cc \u0627\u0633\u062a \u0648 \u0646\u06cc\u0627\u0632 \u0628\u0647 \u0645\u0627\u0698\u0648\u0644 HC-05 \u0646\u062f\u0627\u0631\u062f. \u0628\u0627 \u0627\u067e\u0644\u06cc\u06a9\u06cc\u0634\u0646 \u0631\u0627\u06cc\u06af\u0627\u0646 <strong>Dabble<\/strong> \u06cc\u0627 <strong>BlueControl<\/strong>\u060c \u06cc\u06a9 Joystick \u0645\u062c\u0627\u0632\u06cc \u0631\u0648\u06cc \u06af\u0648\u0634\u06cc \u0627\u06cc\u062c\u0627\u062f \u0645\u06cc\u200c\u0634\u0648\u062f \u06a9\u0647 \u0645\u062e\u062a\u0635\u0627\u062a X,Y \u0622\u0646 \u0627\u0632 \u0637\u0631\u06cc\u0642 Bluetooth \u0628\u0647 ESP32 \u0627\u0631\u0633\u0627\u0644 \u0645\u06cc\u200c\u0634\u0648\u062f.<\/p>\n<p><strong>L298N<\/strong> \u06cc\u06a9 \u062f\u0631\u0627\u06cc\u0648\u0631 \u0645\u0648\u062a\u0648\u0631 H-Bridge \u0627\u0633\u062a \u06a9\u0647 \u0627\u0645\u06a9\u0627\u0646 \u06a9\u0646\u062a\u0631\u0644 \u062f\u0648 \u0645\u0648\u062a\u0648\u0631 DC \u0631\u0627 \u0628\u0627 PWM \u0641\u0631\u0627\u0647\u0645 \u0645\u06cc\u200c\u06a9\u0646\u062f \u2014 \u0633\u0631\u0639\u062a \u0648 \u062c\u0647\u062a \u0647\u0631 \u062f\u0648 \u0645\u0648\u062a\u0648\u0631 \u0628\u0647 \u0635\u0648\u0631\u062a \u0645\u0633\u062a\u0642\u0644 \u0642\u0627\u0628\u0644 \u062a\u0646\u0638\u06cc\u0645 \u0627\u0633\u062a.<\/p>\n<\/div>\n<div style='border:1px solid #d8d8d8;padding:18px 20px;border-radius:12px;background:#fafafa;margin-bottom:22px'>\n<h2 style='margin-top:0'>\u0645\u062d\u0635\u0648\u0644\u06cc \u06a9\u0647 \u0645\u06cc\u200c\u0633\u0627\u0632\u06cc\u062f<\/h2>\n<p>\u06cc\u06a9 UGV 4WD \u06a9\u0647 \u0628\u0627 Joystick \u06af\u0648\u0634\u06cc Android \u0627\u0632 \u0637\u0631\u06cc\u0642 Bluetooth \u0628\u0627 \u0628\u0631\u062f \u06f1\u06f0 \u0645\u062a\u0631 \u06a9\u0646\u062a\u0631\u0644 \u0645\u06cc\u200c\u0634\u0648\u062f.<\/p>\n<ul>\n<li><strong>\u0632\u0645\u0627\u0646 \u0633\u0627\u062e\u062a:<\/strong> \u06f4 \u062a\u0627 \u06f6 \u0633\u0627\u0639\u062a<\/li>\n<li><strong>\u0647\u0632\u06cc\u0646\u0647:<\/strong> \u06f8\u06f0\u06f0 \u0647\u0632\u0627\u0631 \u062a\u0627 \u06f1.\u06f5 \u0645\u06cc\u0644\u06cc\u0648\u0646 \u062a\u0648\u0645\u0627\u0646<\/li>\n<li><strong>\u0628\u0631\u062f \u06a9\u0646\u062a\u0631\u0644:<\/strong> \u06f1\u06f0-\u06f3\u06f0 \u0645\u062a\u0631 Bluetooth<\/li>\n<\/ul>\n<\/div>\n<p><svg viewBox='0 0 860 210' width='100%' xmlns='http:\/\/www.w3.org\/2000\/svg' style='background:#fff;border:1px solid #e0e0e0;border-radius:12px;margin-bottom:22px'>\n<rect x='300' y='70' width='260' height='100' rx='14' fill='#f7d794' stroke='#a06d00' stroke-width='2'\/>\n<circle cx='320' cy='50' r='18' fill='#555' stroke='#333' stroke-width='2'\/>\n<circle cx='540' cy='50' r='18' fill='#555' stroke='#333' stroke-width='2'\/>\n<circle cx='320' cy='190' r='18' fill='#555' stroke='#333' stroke-width='2'\/>\n<circle cx='540' cy='190' r='18' fill='#555' stroke='#333' stroke-width='2'\/>\n<line x1='320' y1='68' x2='320' y2='70' stroke='#555' stroke-width='3'\/>\n<line x1='540' y1='68' x2='540' y2='70' stroke='#555' stroke-width='3'\/>\n<line x1='320' y1='172' x2='320' y2='170' stroke='#555' stroke-width='3'\/>\n<line x1='540' y1='172' x2='540' y2='170' stroke='#555' stroke-width='3'\/>\n<text x='430' y='110' text-anchor='middle' font-size='13' font-family='Tahoma'>ESP32 + L298N<\/text>\n<text x='430' y='128' text-anchor='middle' font-size='11' font-family='Tahoma'>Bluetooth + \u0645\u0648\u062a\u0648\u0631<\/text>\n<rect x='50' y='80' width='120' height='70' rx='12' fill='#8bd3dd' stroke='#1f6f78' stroke-width='2'\/>\n<text x='110' y='113' text-anchor='middle' font-size='12' font-family='Tahoma'>\u06af\u0648\u0634\u06cc Android<\/text>\n<text x='110' y='130' text-anchor='middle' font-size='11' font-family='Tahoma'>Dabble App<\/text>\n<line x1='170' y1='115' x2='300' y2='115' stroke='#555' stroke-width='2' stroke-dasharray='5,3'\/>\n<text x='235' y='108' text-anchor='middle' font-size='10' font-family='Tahoma'>BT Classic<\/text>\n<text x='430' y='198' text-anchor='middle' font-size='13' font-family='Tahoma' fill='#888'>UGV 4WD \u2014 Joystick BT \u2192 ESP32 \u2192 L298N \u2192 \u06f4 \u0645\u0648\u062a\u0648\u0631<\/text>\n<\/svg><\/p>\n<h2>\u0642\u0637\u0639\u0627\u062a \u0644\u0627\u0632\u0645 (BOM)<\/h2>\n<table style='width:100%;border-collapse:collapse;margin-bottom:18px'>\n<thead>\n<tr style='background:#e8f0fe'>\n<th style='padding:9px;border:1px solid #ddd;text-align:right'>\u0642\u0637\u0639\u0647<\/th>\n<th style='padding:9px;border:1px solid #ddd;text-align:right'>\u0646\u0642\u0634<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td style='padding:8px;border:1px solid #ddd'>ESP32 DevKit V1<\/td>\n<td style='padding:8px;border:1px solid #ddd'>\u06a9\u0646\u062a\u0631\u0644\u0631 + BT<\/td>\n<\/tr>\n<tr style='background:#fafafa'>\n<td style='padding:8px;border:1px solid #ddd'>\u0634\u0627\u0633\u06cc 4WD Smart Robot Car<\/td>\n<td style='padding:8px;border:1px solid #ddd'>\u0628\u062f\u0646\u0647 + \u06f4 \u0645\u0648\u062a\u0648\u0631 + \u0686\u0631\u062e<\/td>\n<\/tr>\n<tr>\n<td style='padding:8px;border:1px solid #ddd'>L298N Motor Driver<\/td>\n<td style='padding:8px;border:1px solid #ddd'>\u06a9\u0646\u062a\u0631\u0644 \u06f2 \u062c\u0641\u062a \u0645\u0648\u062a\u0648\u0631<\/td>\n<\/tr>\n<tr style='background:#fafafa'>\n<td style='padding:8px;border:1px solid #ddd'>\u0628\u0627\u062a\u0631\u06cc 7.4V LiPo \u06cc\u0627 \u06f6\u00d7AA<\/td>\n<td style='padding:8px;border:1px solid #ddd'>\u062a\u063a\u0630\u06cc\u0647<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<h2>\u06a9\u062f ESP32 \u2014 Bluetooth Joystick Control<\/h2>\n<pre style='background:#1e1e1e;color:#d4d4d4;padding:18px;border-radius:10px;overflow-x:auto;font-size:13px'><code class='language-cpp'>\n#include \"BluetoothSerial.h\"\nBluetoothSerial SerialBT;\n\n\/\/ \u067e\u06cc\u0646\u200c\u0647\u0627\u06cc L298N:\nconst int L_FWD=26, L_BWD=27, L_PWM=14;\nconst int R_FWD=25, R_BWD=33, R_PWM=32;\nconst int BASE = 180;  \/\/ \u0633\u0631\u0639\u062a \u067e\u0627\u06cc\u0647\n\nvoid setMotors(int left, int right) {\n  left  = constrain(left,  -255, 255);\n  right = constrain(right, -255, 255);\n  digitalWrite(L_FWD, left  > 0); digitalWrite(L_BWD, left  < 0);\n  digitalWrite(R_FWD, right > 0); digitalWrite(R_BWD, right < 0);\n  ledcWrite(0, abs(left));  \/\/ PWM channel 0 \u2192 L_PWM\n  ledcWrite(1, abs(right)); \/\/ PWM channel 1 \u2192 R_PWM\n}\n\nvoid setup() {\n  Serial.begin(115200);\n  SerialBT.begin(\"UGV_ESP32\");\n  int pwmPins[] = {L_FWD,L_BWD,R_FWD,R_BWD};\n  for(int p : pwmPins) pinMode(p, OUTPUT);\n  ledcSetup(0, 1000, 8); ledcAttachPin(L_PWM, 0);\n  ledcSetup(1, 1000, 8); ledcAttachPin(R_PWM, 1);\n}\n\nvoid loop() {\n  if(SerialBT.available()) {\n    \/\/ \u0641\u0631\u0645\u062a Dabble: F(forward), B(back), L(left), R(right), S(stop)\n    char c = SerialBT.read();\n    Serial.println(c);\n    if(c == 'F')      setMotors(BASE, BASE);\n    else if(c == 'B') setMotors(-BASE, -BASE);\n    else if(c == 'L') setMotors(-BASE\/2, BASE);\n    else if(c == 'R') setMotors(BASE, -BASE\/2);\n    else if(c == 'S') setMotors(0, 0);\n  }\n}\n<\/code><\/pre>\n<h2>\u0686\u06a9\u200c\u0644\u06cc\u0633\u062a \u062a\u0633\u062a<\/h2>\n<table style='width:100%;border-collapse:collapse;margin-bottom:18px'>\n<thead>\n<tr style='background:#e8f0fe'>\n<th style='padding:9px;border:1px solid #ddd;text-align:right'>\u062a\u0633\u062a<\/th>\n<th style='padding:9px;border:1px solid #ddd;text-align:right'>\u0646\u062a\u06cc\u062c\u0647<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td style='padding:8px;border:1px solid #ddd'>\u06af\u0648\u0634\u06cc \u062f\u0631 BT Settings \"UGV_ESP32\" \u0631\u0627 \u0645\u06cc\u200c\u0628\u06cc\u0646\u062f\u061f<\/td>\n<td style='padding:8px;border:1px solid #ddd'>\u0628\u0644\u0647<\/td>\n<\/tr>\n<tr style='background:#fafafa'>\n<td style='padding:8px;border:1px solid #ddd'>Forward \u2192 \u0647\u0631 \u06f4 \u0686\u0631\u062e \u0628\u0647 \u062c\u0644\u0648\u061f<\/td>\n<td style='padding:8px;border:1px solid #ddd'>\u0628\u0644\u0647 \u2014 \u0627\u06af\u0631 \u0646\u0647\u060c \u062c\u0647\u062a \u0645\u0648\u062a\u0648\u0631 \u0631\u0627 \u0639\u0648\u0636 \u06a9\u0646\u06cc\u062f<\/td>\n<\/tr>\n<tr>\n<td style='padding:8px;border:1px solid #ddd'>Left\/Right \u2192 \u0645\u06cc\u200c\u0686\u0631\u062e\u062f\u061f<\/td>\n<td style='padding:8px;border:1px solid #ddd'>\u0628\u0644\u0647<\/td>\n<\/tr>\n<tr style='background:#fafafa'>\n<td style='padding:8px;border:1px solid #ddd'>Stop \u2192 \u0645\u06cc\u200c\u0627\u06cc\u0633\u062a\u062f\u061f<\/td>\n<td style='padding:8px;border:1px solid #ddd'>\u0628\u0644\u0647<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p><svg viewBox='0 0 860 200' width='100%' xmlns='http:\/\/www.w3.org\/2000\/svg' style='background:#fff;border:1px solid #e0e0e0;border-radius:12px;margin-bottom:22px'>\n<rect x='40' y='75' width='155' height='60' rx='12' fill='#8bd3dd' stroke='#1f6f78' stroke-width='2'\/>\n<rect x='245' y='75' width='155' height='60' rx='12' fill='#f7d794' stroke='#a06d00' stroke-width='2'\/>\n<rect x='450' y='75' width='155' height='60' rx='12' fill='#b7e4a0' stroke='#3a7a1e' stroke-width='2'\/>\n<rect x='655' y='75' width='165' height='60' rx='12' fill='#e8f4ff' stroke='#3a60c0' stroke-width='2'\/>\n<line x1='195' y1='105' x2='245' y2='105' stroke='#555' stroke-width='2.5' stroke-dasharray='6,3'\/>\n<line x1='400' y1='105' x2='450' y2='105' stroke='#555' stroke-width='2.5'\/>\n<line x1='605' y1='105' x2='655' y2='105' stroke='#555' stroke-width='2.5'\/>\n<text x='117' y='100' text-anchor='middle' font-size='12' font-family='Tahoma'>Dabble App<\/text>\n<text x='117' y='115' text-anchor='middle' font-size='11' font-family='Tahoma'>Joystick \u06af\u0648\u0634\u06cc<\/text>\n<text x='322' y='100' text-anchor='middle' font-size='12' font-family='Tahoma'>ESP32 BT<\/text>\n<text x='322' y='115' text-anchor='middle' font-size='11' font-family='Tahoma'>Classic \u067e\u0627\u0631\u0633<\/text>\n<text x='527' y='100' text-anchor='middle' font-size='12' font-family='Tahoma'>L298N \u00d7 \u06f2<\/text>\n<text x='527' y='115' text-anchor='middle' font-size='11' font-family='Tahoma'>PWM \u0645\u0648\u062a\u0648\u0631<\/text>\n<text x='737' y='100' text-anchor='middle' font-size='12' font-family='Tahoma'>UGV 4WD<\/text>\n<text x='737' y='115' text-anchor='middle' font-size='11' font-family='Tahoma'>\u062c\u0647\u062a + \u0633\u0631\u0639\u062a<\/text>\n<text x='430' y='175' text-anchor='middle' font-size='13' font-family='Tahoma' fill='#666'>UGV 4WD BT \u2014 Joystick \u06af\u0648\u0634\u06cc \u2192 ESP32 \u2192 L298N \u2192 \u062d\u0631\u06a9\u062a<\/text>\n<\/svg><\/p>\n<h2>\u0648\u06cc\u062f\u0626\u0648\u0647\u0627\u06cc \u0622\u0645\u0648\u0632\u0634\u06cc<\/h2>\n<div style='display:grid;grid-template-columns:repeat(auto-fit,minmax(300px,1fr));gap:18px;margin:20px 0'>\n<iframe width='100%' height='315' src='https:\/\/www.youtube.com\/embed\/CqmOYeW5S2I' title='ESP32 Bluetooth RC Car Dabble App' frameborder='0' allow='accelerometer;autoplay;clipboard-write;encrypted-media;gyroscope;picture-in-picture' allowfullscreen><\/iframe><br \/>\n<iframe width='100%' height='315' src='https:\/\/www.youtube.com\/embed\/mCCkZBjF47c' title='ESP32 L298N Motor Control Tutorial' frameborder='0' allow='accelerometer;autoplay;clipboard-write;encrypted-media;gyroscope;picture-in-picture' allowfullscreen><\/iframe>\n<\/div>\n<h2>\u0645\u0646\u0627\u0628\u0639 \u0628\u06cc\u0634\u062a\u0631<\/h2>\n<ul>\n<li><a href='https:\/\/www.aparat.com\/result\/ESP32_UGV_%D8%A8%D9%84%D9%88%D8%AA%D9%88%D8%AB_%DA%A9%D9%86%D8%AA%D8%B1%D9%84' target='_blank'>\u0622\u067e\u0627\u0631\u0627\u062a: ESP32 UGV \u0628\u0644\u0648\u062a\u0648\u062b \u06a9\u0646\u062a\u0631\u0644 \u0641\u0627\u0631\u0633\u06cc<\/a><\/li>\n<li><a href='https:\/\/randomnerdtutorials.com\/esp32-bluetooth-classic-arduino-ide\/' target='_blank'>Random Nerd: ESP32 Bluetooth Classic<\/a><\/li>\n<\/ul>\n","protected":false},"excerpt":{"rendered":"<p>\u0622\u0645\u0648\u0632\u0634 \u0633\u0627\u062e\u062a UGV 4WD \u0628\u0627 ESP32\u060c \u062f\u0631\u0627\u06cc\u0648\u0631 L298N \u0648 \u06a9\u0646\u062a\u0631\u0644 Joystick \u0627\u0632 \u06af\u0648\u0634\u06cc Android \u0627\u0632 \u0637\u0631\u06cc\u0642 Bluetooth Classic\u061b \u062d\u0631\u06a9\u062a \u067e\u06cc\u0634\/\u067e\u0633\/\u0686\u067e\/\u0631\u0627\u0633\u062a \u0648 \u0686\u0631\u062e\u0634 \u062f\u0631 \u062c\u0627.<\/p>\n","protected":false},"author":1,"featured_media":479,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"pagelayer_contact_templates":[],"_pagelayer_content":"","footnotes":""},"categories":[16,20],"tags":[243,247,244,22,245,246,48,50],"class_list":["post-480","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-ugv","category-projects-2","tag-4wd","tag-android","tag-bluetooth","tag-esp32","tag-joystick","tag-l298n","tag-ugv","tag-50"],"_links":{"self":[{"href":"https:\/\/projectleon.net\/make\/wp-json\/wp\/v2\/posts\/480","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/projectleon.net\/make\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/projectleon.net\/make\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/projectleon.net\/make\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/projectleon.net\/make\/wp-json\/wp\/v2\/comments?post=480"}],"version-history":[{"count":1,"href":"https:\/\/projectleon.net\/make\/wp-json\/wp\/v2\/posts\/480\/revisions"}],"predecessor-version":[{"id":481,"href":"https:\/\/projectleon.net\/make\/wp-json\/wp\/v2\/posts\/480\/revisions\/481"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/projectleon.net\/make\/wp-json\/wp\/v2\/media\/479"}],"wp:attachment":[{"href":"https:\/\/projectleon.net\/make\/wp-json\/wp\/v2\/media?parent=480"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/projectleon.net\/make\/wp-json\/wp\/v2\/categories?post=480"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/projectleon.net\/make\/wp-json\/wp\/v2\/tags?post=480"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}